1. 23 Aug, 2025 6 commits
    • nextime's avatar
      Increase page click timeout to 48 seconds (3 seconds more than reply timeout) · a5320424
      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.
      a5320424
    • nextime's avatar
      Implement base64 encoding for chatbot responses to avoid formatting issues · dd4e12a0
      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.
      dd4e12a0
    • nextime's avatar
      Enforce strict ID matching and complete JSON validation before serving responses · 9920f907
      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.
      9920f907
    • nextime's avatar
      Improve JSON response validation and increase timeout to 45 seconds · c0d398f4
      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.
      c0d398f4
    • nextime's avatar
      Implement improved JSON-based response detection system · 41cc9c97
      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.
      41cc9c97
    • nextime's avatar
      Initial commit: Add OLProxy with comprehensive documentation and GPLv3 licensing · 862ec611
      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
      862ec611