-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Add ChatCompletionCache along with AbstractStore for caching completions #4924
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Files not reviewed (1)
- python/packages/autogen-core/src/autogen_core/store/abstract_store_base.py: Evaluated as low risk
@ekzhu do we need any documentation changes? I suppose API Reference gets updated automatically? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4924 +/- ##
===========================================
+ Coverage 55.71% 68.58% +12.87%
===========================================
Files 68 158 +90
Lines 5781 10152 +4371
===========================================
+ Hits 3221 6963 +3742
- Misses 2560 3189 +629
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
python/packages/autogen-core/src/autogen_core/store/abstract_store_base.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from API documentation. We can discuss the cache in the following places:
f6f398b
to
86ae223
Compare
@ekzhu added docs as you mentioned :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should spend some more time to see if the interface can be improved. Especially if this is going into core
86ae223
to
652333d
Compare
652333d
to
7addcf4
Compare
Why are these changes needed?
Add a caching wrapper to ChatCompletionClient, that can use any store with get/set methods for storage.
Related issue number
Closes #4752
Checks