- 25 Aug, 2025 2 commits
-
-
nextime authored
- Enhanced Gemini prompt template with expert-level assistant designation - Added HTML code block enclosure for better response formatting - Fixed typos in Gemini prompt template - Updated browser data directory to use user home directory (~/.playwright_data) - Updated CHANGELOG.md and README.md with latest changes
-
nextime authored
-
- 24 Aug, 2025 13 commits
-
-
nextime authored
-
nextime authored
-
nextime authored
-
nextime authored
-
nextime authored
- Enhanced response detection with increased timeouts and better reliability - Added HTML entity decoding for clean tool representation - Optimized Gemini prompt template with specific tool mapping - Improved error handling and debugging capabilities - Fixed JavaScript regex syntax warnings - Added comprehensive logging and validation - Updated changelog with detailed feature documentation
-
nextime authored
- Added 2-second delay before response detection to allow Gemini to finish generating - Enhanced JavaScript fallback logic to better handle response waiting - Improved timing for response detection to avoid returning setup acknowledgments - Better synchronization between prompt sending and response detection
-
nextime authored
- Log which response ID was matched for each reply - Track exact matches vs fallback responses - Include response ID in prompts.log for correlation - Enhanced debugging visibility for response detection - Console logging for JavaScript fallback cases
-
nextime authored
- Added request ID logging to prompts.log for proper correlation - Log decoded responses in prompts.log to show what gets sent back via API - Improved HTML debug output with body-only extraction and response markers - Better request ID consistency throughout the system - Enhanced debug information for troubleshooting response detection
-
nextime authored
- Enhanced filtering to ignore example responses from prompt template - Added filtering for TEST123 and example-specific keywords - Better detection of actual responses vs setup/template content - More robust response identification for Gemini
-
nextime authored
- Added --debug argument to the main argument parser - Fixed duplicate argument parser issue - --debug switch now works correctly
-
nextime authored
- Added --debug switch that creates timestamped directory - Saves all prompts sent to chatbots in prompts.log - Saves debug execution logs in debug.log - Captures HTML content of chatbot page when response is detected - Directory structure: debug_[unix_epoch]/ - prompts.log: All prompts sent to chatbots - debug.log: Detailed execution logs - response_[id]_[timestamp].html: HTML snapshots - Improved response detection to correctly identify actual responses vs setup acknowledgments - Enhanced JavaScript detection logic with better filtering
-
nextime authored
- Updated Gemini prompt template to allow basic text formatting - Added support for new lines, tabs, and basic markup language - Maintained RESPONSE_ID markers for reliable parsing - Enhanced example with formatting demonstration - Preserved tool usage requirements and response structure
-
nextime authored
- Created olproxy_client.py with full API support - Supports both Ollama and OpenAI API formats - Includes command-line interface for easy testing - Provides methods for all major API endpoints - Added proper error handling and JSON formatting
-
- 23 Aug, 2025 20 commits
-
-
nextime authored
- Fixed Python syntax warnings for invalid escape sequences in JS regex - Updated Gemini prompt template to emphasize mandatory tool usage - Changed Gemini response format from HTML tags to plain text with RESPONSE_ID markers - Updated response detection logic for improved reliability - Added Gemini model to supported models list in README - Updated CHANGELOG with detailed changes
-
nextime authored
- Fixed JavaScript regex patterns by properly escaping requestId with replace() method - Added proper regex escaping to prevent 'Invalid or unexpected token' errors - Simplified regex patterns to use only two main patterns instead of four complex ones - Enhanced Enter key submission with proper focus timing and delays - Added 0.5 second delays before and after Enter key press for better reliability - Ensures proper input focus before sending Enter key for Gemini chatbot
-
nextime authored
-
nextime authored
- Clarified prompt to prevent XML tags and code blocks around JSON output - Specified that formatting restrictions apply only to JSON wrapper, not answer content - Enhanced JavaScript parser to detect JSON in span elements and other containers - Added comprehensive container detection including spans, divs, and paragraphs - Improved JSON detection to handle responses outside of code blocks - Maintained backward compatibility with existing code block detection
-
nextime authored
- Removed problematic regex pattern with nested quotes that caused JavaScript syntax error - Simplified JSON detection patterns to avoid complex quote escaping issues - Fixed regex patterns on lines 499-500 that were causing 'Invalid or unexpected token' - Maintained JSON detection functionality while eliminating syntax errors - Improved JavaScript code reliability and parsing
-
nextime authored
- Fixed invalid escape sequence '\s' on line 523 in JavaScript regex pattern - Changed from single backslash to double backslash for proper escaping - Ensures Python interpreter correctly handles the JavaScript string literal - Eliminates SyntaxWarning while maintaining JavaScript regex functionality
-
nextime authored
- Redesigned prompt to be more direct and system-like - Added explicit instructions to NOT explain the encoding process - Removed verbose explanations that were causing chatbots to add commentary - Streamlined format requirements to prevent 'I'll encode this in JSON' responses - Made instructions more concise and command-like for faster processing - Maintained all functionality while reducing response time
-
nextime authored
- Removed complex escape sequence handling that caused syntax errors - Simplified cleanJsonText function to focus on essential HTML entity decoding - Streamlined malformed JSON handling with cleaner pattern matching - Reduced nested try-catch complexity for better maintainability - Maintained core functionality while improving code reliability
-
nextime authored
- Simplified regex patterns to avoid escaping issues - Removed overly complex regex constructions that caused 'missing ) after argument list' errors - Maintained functionality while improving reliability - Fixed responseMatch pattern extraction for malformed JSON handling
-
nextime authored
- Set explicit timeout of 70 seconds for button click operation - This is 10 seconds more than the 60-second final response timeout - Prevents button selector timeouts that were causing failures - Ensures button click waits long enough for slow-loading pages - Addresses user feedback about button selector timeout issues The timeout hierarchy is now: - Button click: 70 seconds - Final response detection: 60 seconds - Main JSON detection: 45 seconds - Container selector: 48 seconds
-
nextime authored
- Add explicit step-by-step instructions for chatbot to follow - Emphasize waiting for COMPLETE response before JSON formatting - Use numbered list format for clarity and better compliance - Add example JSON format to reduce ambiguity - Separate user question clearly from formatting instructions - Address issue where chatbot was truncating responses before base64 encoding This should resolve the problem where the chatbot wasn't including the whole reply correctly in the base64 encoded response key.
-
nextime authored
- Change '\\n' to '\n' in allTexts.join() call - This was causing 'missing ) after argument list' error in page.evaluate - JavaScript string literals need single backslash, not double backslash - Resolves the remaining JavaScript syntax error in JSON response detection
-
nextime authored
- Add proper null checking for chained .match() calls - Prevent 'missing ) after argument list' error when second match returns null - Improve error handling in malformed JSON response extraction - This resolves the JavaScript syntax error in page.evaluate function
-
nextime authored
- Replace inline regex literals with RegExp constructors for dynamic requestId - Fix 'missing ) after argument list' error in JSON pattern matching - Update all regex patterns to use proper RegExp constructor syntax - Ensure proper string concatenation with requestId variable - Fix jsonMatch pattern to use separate RegExp objects This resolves the JavaScript syntax error that was causing page.evaluate to fail during JSON response detection.
-
nextime authored
- Update wait_for_selector timeout from 60 seconds to 48 seconds - Align page timeout with reply timeout (45s) plus 3 second buffer - Ensure page operations don't timeout before response detection completes - Improve coordination between page interaction and response waiting phases This prevents page timeout issues while maintaining reasonable wait times for container selector detection during chatbot interactions.
-
nextime authored
- Change prompt instruction to request base64 encoded responses instead of escaped text - Add base64 import and decoding logic in forward_to_chatbot function - Update JSON validation to verify base64 format using regex and atob() validation - Add comprehensive error handling for base64 decoding with fallback to raw response - Enhanced logging to track base64 decoding success/failure - Prevent issues with special characters, HTML entities, and complex formatting This approach eliminates problems with HTML encoding, escape sequences, and special characters by having the chatbot encode the entire response in base64 format, which we then decode on the proxy side.
-
nextime authored
- Add comprehensive logging with emojis for better debugging visibility - Implement strict validation requiring exact ID match and non-empty response - Enhanced observer logic to only resolve on complete, validated JSON - Add priority-based detection: HTML code blocks first, then text content - Prevent premature response serving until complete JSON with matching ID is found - Add detailed console logging for tracking detection progress - Ensure system waits for complete ID match before serving any API response This ensures the API absolutely waits for the complete JSON response with the matching request ID before serving any reply to clients.
-
nextime authored
- Increase main timeout to 45 seconds as requested for complete response detection - Add strict JSON validation requiring both 'response' and 'id' keys - Implement isCompleteValidJson() function to ensure JSON completeness - Only return responses when JSON is complete and valid - Add enhanced logging for debugging partial matches - Prevent premature response extraction from incomplete JSON - Add safety timeout at 60 seconds to prevent hanging - Improve observer logic to only resolve on complete, valid JSON This ensures the API only serves responses when we have complete, valid JSON with both required keys, preventing partial or corrupted responses.
-
nextime authored
- Replace spy word detection with robust JSON-based response extraction - Add UUID-based unique request identification for better reliability - Implement comprehensive JSON parsing with error recovery mechanisms - Add support for partial JSON response extraction - Enhance error handling for malformed JSON responses - Improve detection of responses containing code blocks and special formatting - Better handling of dynamic content and progressive response loading - Update CHANGELOG.md to document breaking changes and improvements This addresses the core issue with complex HTML parsing by requesting structured JSON responses from chatbots, making response extraction much more reliable and accurate.
-
nextime authored
- Add olproxy.py: Python proxy server bridging web chatbots to Ollama API - Add README.md: Comprehensive documentation with logo, usage examples, and API reference - Add CHANGELOG.md: Structured changelog following Keep a Changelog format - Add LICENSE: GPLv3 license with copyright attribution to Stefy Lanza - Add olproxy.jpg: Project logo - All files include proper GPLv3 licensing and attribution
-