Skip to content

Conversation

elroy-bot
Copy link
Owner

Implements a local filesystem cache for embeddings responses to avoid redundant API calls and reduce costs.

Changes

  • Add EmbeddingCache class with FIFO eviction policy
  • Configurable size limit (default 500MB)
  • Filesystem cache in ELROY_HOME_DIR/cache/embeddings/
  • Integrate cache into get_embedding() function
  • Add comprehensive unit tests

Addresses issue #477

🤖 Generated with Claude Code

- Add EmbeddingCache class with FIFO eviction policy
- Configurable size limit (default 500MB)
- Filesystem cache in ELROY_HOME_DIR/cache/embeddings/
- Integrate cache into get_embedding() function
- Add comprehensive unit tests
- Avoid redundant API calls for repeated embeddings

Addresses issue #477

Co-authored-by: elroy-bot <elroy-bot@users.noreply.github.com>
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.

1 participant