Skip to content
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 cache criteria to CachedTool #791

Merged
merged 2 commits into from
Oct 1, 2024
Merged

Conversation

realdavidvega
Copy link
Contributor

Background

The existing implementation of the CachedTool abstract class supports caching but lacks customized criteria for determining whether to use the cache or cache the output.

This PR

  • Adds the shouldUseCache method to determine if the cache should be used for a given input.
  • Adds the shouldCacheOutput method to determine if the output should be cached for a given input and output.
  • Introduces logic adjustments in the invoke and cache methods to respect these new criteria.

@realdavidvega realdavidvega self-assigned this Sep 30, 2024
@realdavidvega realdavidvega merged commit c55ae53 into main Oct 1, 2024
6 checks passed
@realdavidvega realdavidvega deleted the feature/cache-criteria branch October 1, 2024 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants