Skip to content

Commit f828aaa

Browse files
Add comprehensive Vision API support and examples
Introduces full Vision API feature parity with Node.js/JSR SDK, including advanced methods for image analysis, OCR, object detection, accessibility descriptions, batch processing, image comparison, and caption generation. Adds new example files demonstrating all vision capabilities, updates README and CHANGELOG with detailed documentation and usage patterns, and enhances error handling, retry logic, type hints, and endpoint management. Bumps version to 1.7.5 and updates distribution files accordingly.
1 parent 5dad408 commit f828aaa

23 files changed

Lines changed: 2734 additions & 3 deletions

.DS_Store

0 Bytes
Binary file not shown.

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,34 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.7.5] - 2025-08-07
9+
10+
### Added - Comprehensive Vision API Enhancement
11+
- **Complete Vision API Parity**: Full feature parity with Node.js/JSR SDK
12+
- **Advanced Vision Methods**:
13+
- `analyze_with_confidence()` - Analysis with confidence scoring
14+
- `batch_analyze()` - Batch processing for multiple images
15+
- `create_response()` - Advanced input format compatibility
16+
- `compare_images()` - Multi-image comparison
17+
- `generate_caption()` - Social media caption generation with style options
18+
- **Enhanced Error Handling**: Better timeout handling and endpoint fallback
19+
- **Improved Retry Logic**: Smarter retry with exponential backoff
20+
- **Comprehensive Examples**: Complete example files matching Node.js patterns
21+
- **Updated Documentation**: Extensive README with all vision capabilities
22+
- **Utility Functions**: `encode_image()` and `create_data_url()` helpers
23+
- **Better Type Hints**: Improved type annotations for vision API
24+
25+
### Enhanced
26+
- **Vision API Performance**: Reduced default timeout to 60s for better responsiveness
27+
- **Endpoint Management**: Dynamic baseURL support with fallback endpoints
28+
- **Logging**: Added detailed request logging for debugging
29+
- **Response Format**: Consistent response format across all vision methods
30+
31+
### Fixed
32+
- **Timeout Issues**: Better handling of gateway timeouts (524 errors)
33+
- **Server Error Retries**: Proper 5xx error retry logic
34+
- **API Compatibility**: Full compatibility with SVECTOR vision endpoints
35+
836
## [1.0.0] - 2025-06-17
937

1038
### Added

0 commit comments

Comments
 (0)