Skip to content

Conversation

@zhaoyizhu6-pixel
Copy link

  • examples/run_lightmem_bm25.py:

    • Added a new example script to test the bm25 strategy end-to-end.
  • src/lightmem/configs/base.py:

    • Added "bm25" to the Literal types for index_strategy and retrieve_strategy to allow the new config.
  • src/lightmem/configs/memory_manager/base.py:

    • Fixed a ValidationError by changing configs: Optional[dict] to Optional[Any] to match the validator's logic.
  • src/lightmem/configs/retriever/bm25.py:

    • Fixed a ValidationError by adding the required collection_name and path fields to BM25Config.
  • src/lightmem/memory/lightmem.py:

    • Replaced the retrieve method, which was hardcoded for "embedding", with a new version that correctly checks the retrieve_strategy and calls the context_retriever for "bm25".
    • Updated offline_update to correctly call index() when index_strategy="bm25".
    • Fixed multiple AttributeErrors in __init__ related to compressor, model_name, and text_embedder to allow non-embedding strategies to initialize correctly.

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