Skip to content

Commit 3be3bcf

Browse files
llm feedack updates (#94)
* Simplify LLM feedback code while maintaining core functionality - Streamlined UI with cleaner layout and better visual hierarchy - Reduced CSS by 70% using a simpler container-based approach - Simplified JavaScript from ~400 lines to ~130 lines - Improved state management and evolution logic - Maintained all core functionality including art generation, preview, and history Closes #91 Mentat precommits passed. Log: https://mentat.ai/log/ccb24099-4857-47b7-b5d7-d856a21c9041 * Update .gitignore with additional common patterns Added patterns for: - Yarn PnP files - Additional build output directory (out/) - General debug logs - OS-specific files (DS_Store, Thumbs.db) Mentat precommits passed. Log: https://mentat.ai/log/75248827-ef9b-4de6-9167-557d758749fb * Make .gitignore more comprehensive for all app types - Removed wildcard prefixes to work recursively at any depth - Added patterns for various build tools and frameworks - Added web-specific patterns for compiled assets - Added testing and temporary file patterns - Improved organization and categorization Mentat precommits passed. Log: https://mentat.ai/log/9478638d-b20e-4b73-a8ec-7dc7c7cfd202 * Update .gitignore to better handle subfolder apps - Added `**/` prefix to match files at any directory depth - Added patterns for Yarn 2+ cache files - Included vanilla HTML/JS specific patterns - Added more build output and test directories - Improved handling of OS-specific files at all levels Mentat precommits passed. Log: https://mentat.ai/log/4786f47d-56c8-44b6-bb53-1e2e7696062a * Revert "Make .gitignore more comprehensive for all app types" This reverts commit a424654. * enhance visual poetry UI and generation enhance visual poetry UI and generation - Update presets to focus on visual poetry styles (Apollinaire, Mallarmé, etc) - Improve monospace text display with better styling and dimensions - Add seed parameter for reproducible generations - Remove separate current art window in favor of preview - Enhance generation logic with better state management - Improve error handling and logging * Tweaks more prompts * add model selector * more robust fetching logic --------- Co-authored-by: MentatBot <160964065+MentatBot@users.noreply.github.com>
1 parent d0c0d2c commit 3be3bcf

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

llm-feedback/index.html

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
font-family: 'Courier New', Courier, monospace;
3333
white-space: pre;
3434
display: block;
35-
width: 480px;
35+
width: 720px;
3636
height: 600px;
3737
overflow: auto;
3838
background: #f8f8f8;
@@ -252,11 +252,25 @@ <h2>History</h2>
252252
let seed = elements.seed.value ? parseInt(elements.seed.value) : Math.floor(Math.random() * 10);
253253
elements.seed.value = seed; // Update input with chosen seed
254254

255-
const url = `https://text.pollinations.ai/${encodedPrompt}?system=${encodedSystem}&seed=${seed}&model=${getSelectedModel()}`;
256-
console.log('Request URL:', url);
255+
257256

257+
let response = null;
258258
console.log('Fetching...');
259-
const response = await fetch(url);
259+
do {
260+
const url = `https://text.pollinations.ai/${encodedPrompt}?system=${encodedSystem}&seed=${seed}&model=${getSelectedModel()}`;
261+
console.log('Request URL:', url);
262+
263+
try {
264+
response = await fetch(url);
265+
} catch (error) {
266+
console.error('Fetch error:', error);
267+
}
268+
if (!response.ok) {
269+
seed = seed + 1;
270+
await new Promise(resolve => setTimeout(resolve, 10000));
271+
}
272+
console.log('Trying fetch...', url);
273+
} while (!response.ok);
260274
console.log('Response received:', response.status);
261275

262276
const text = await response.text();

0 commit comments

Comments
 (0)