-
Notifications
You must be signed in to change notification settings - Fork 7.8k
fix: Add proper serialization to RedisStore for complex objects #6905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Add proper serialization to RedisStore for complex objects #6905
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6905 +/- ##
==========================================
- Coverage 81.00% 80.89% -0.11%
==========================================
Files 237 237
Lines 18329 18349 +20
==========================================
- Hits 14847 14844 -3
- Misses 3482 3505 +23
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
python/packages/autogen-ext/src/autogen_ext/cache_store/redis.py
Outdated
Show resolved
Hide resolved
|
@biradrags pls review to see if this addresses your issue, thx. |
Why are these changes needed?
The RedisStore implementation currently doesn't properly handle serialization of complex objects like Pydantic models, causing ChatCompletionCache to fail when used with RedisStore. This PR fixes the issue by adding proper JSON serialization and deserialization while maintaining backward compatibility for primitive types.
Related issue number
Closes #6899
Checks