FastChat
FastChat copied to clipboard
Fix image conversion state handling across formats
trafficstars
Why are these changes needed?
This PR fixes critical issues in image format conversion:
- Undefined
imagevariable - Ensured proper initialization for URL/local/bytes formats - Method argument mismatch - Removed unexpected parameter from
convert_image_to_base64() - Null buffer references - Standardized
BytesIOinitialization across all formats - Missing format validation - Added explicit error for unsupported image types
Related issue number (if applicable)
Checks
- [x] I've run
format.shto lint the changes in this PR. - [ ] I've included any doc changes needed.
- [x] I've made sure the relevant tests are passing (if applicable).
您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
@infwinston @CodingWithTim could you please take a look into this small PR when you get the chance? thanks 🙌