Skip to content

Fix embed/embed_multi not updating content column when store=True re-run#1516

Open
ikatyal2110 wants to merge 1 commit into
simonw:mainfrom
ikatyal2110:fix-embed-store-null-content
Open

Fix embed/embed_multi not updating content column when store=True re-run#1516
ikatyal2110 wants to merge 1 commit into
simonw:mainfrom
ikatyal2110:fix-embed-store-null-content

Conversation

@ikatyal2110

Copy link
Copy Markdown

If you first run embed or embed_multi without --store, then re-run with --store, the content column stays NULL because the content_hash match causes an early return. This makes it impossible to add content storage to an existing collection without deleting and recreating it.

The fix checks whether the existing record already has content populated, and if not, updates it in place without re-computing the embedding.

Fixes #224

…t was previously NULL

When content is re-embedded with --store after an initial run without --store,
the content_hash match caused an early return without populating the content
column. Now checks if the existing record has NULL content and updates it.

Fixes simonw#224
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.

Calling llm embed with the same content but different --store settings does not update the table

2 participants