Commit 41cc9c97 authored by nextime's avatar nextime

Implement improved JSON-based response detection system

- 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.
parent 862ec611
...@@ -8,9 +8,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -8,9 +8,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added ### Added
- Initial project documentation - Enhanced JSON-based response detection system with unique request IDs
- GPLv3 license implementation - UUID-based request identification for improved reliability
- Comprehensive README with usage examples - Robust JSON parsing with error recovery mechanisms
- Support for partial JSON response extraction
### Changed
- **BREAKING**: Replaced spy word detection system with JSON-based response extraction
- Modified prompt injection to request structured JSON responses
- Improved response detection reliability and accuracy
- Enhanced error handling for malformed JSON responses
### Fixed
- Resolved issues with complex HTML response parsing
- Improved detection of responses containing code blocks and special formatting
- Better handling of dynamic content and progressive response loading
## [0.1.0] - 2025-08-23 ## [0.1.0] - 2025-08-23
...@@ -45,7 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -45,7 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `POST /v1/chat/completions` - OpenAI-compatible chat completion - `POST /v1/chat/completions` - OpenAI-compatible chat completion
- **Response Extraction Strategies**: - **Response Extraction Strategies**:
- Primary: Spy word detection with flexible pattern matching - Primary: JSON-based response detection with unique UUID identifiers
- Secondary: Progressive content monitoring with stability detection - Secondary: Progressive content monitoring with stability detection
- Fallback: Heuristic latest response detection - Fallback: Heuristic latest response detection
...@@ -65,6 +77,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ...@@ -65,6 +77,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Built with Python 3.7+ compatibility - Built with Python 3.7+ compatibility
- Uses `aiohttp` for async HTTP server - Uses `aiohttp` for async HTTP server
- Uses `playwright` for browser automation - Uses `playwright` for browser automation
- Uses `uuid` for unique request identification
- Implements comprehensive error handling - Implements comprehensive error handling
- Supports concurrent requests with proper browser page management - Supports concurrent requests with proper browser page management
- Includes detailed logging for debugging and monitoring - Includes detailed logging for debugging and monitoring
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment