Skip to content

fix: allow add_memory() to work when topic_segment=False#64

Open
li5435945-ship-it wants to merge 1 commit into
zjunlp:mainfrom
li5435945-ship-it:fix/topic-segment-disabled
Open

fix: allow add_memory() to work when topic_segment=False#64
li5435945-ship-it wants to merge 1 commit into
zjunlp:mainfrom
li5435945-ship-it:fix/topic-segment-disabled

Conversation

@li5435945-ship-it

Copy link
Copy Markdown

Problem

When topic_segment=False is set in the configuration, add_memory() returns early before performing any LLM extraction, resulting in zero memory entries being stored in the vector database.

Fixes #55

Solution

When topic_segment=False, treat all messages as a single segment and proceed with the normal extraction pipeline.

Changes

  • src/lightmem/memory/lightmem.py: 6 insertions, 11 deletions

When topic_segment=False, add_memory() returned early before performing
any LLM extraction, resulting in zero memory entries being stored in
the vector database. This made it impossible to use LightMem without
the LLMlingua-2 model.

Fix: When topic_segment is disabled, treat all messages as a single
segment and proceed with the normal extraction pipeline.

Fixes zjunlp#55
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.

Bug: topic_segment=False causes add_memory() to skip the entire extraction pipeline, resulting in empty Qdrant storage

1 participant