Skip to content

Conversation

@majiayu000
Copy link

Summary

  • Fixes embedding field being set to empty list [] instead of initial value when deleting last embedding
  • Affects MongoWriter, PGWriter, and SQLiteWriter implementations
  • Enables subsequent embedding operations to work correctly after deletion

Test plan

  • Added unit tests for _update_embedding_record_handler method
  • Tests verify reset to initial value when deleting last embedding
  • Tests verify keeping other embeddings when deleting one from multiple

Fixes #1094

Signed-off-by: majiayu000 [email protected]

When deleting the last embedding from a library, the embedding field was
being set to an empty list [] instead of the initial "no embedding" value.
This caused subsequent operations like installing new embeddings to fail.

This fix ensures that when all embeddings are deleted, the embedding field
is reset to the initial value:
[{"embedding_status": "no", "embedding_model": "none", "embedding_db": "none",
  "embedded_blocks": 0, "embedding_dims": 0, "time_stamp": "NA"}]

Fixes llmware-ai#1094

Signed-off-by: majiayu000 <[email protected]>
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.

Library.delete_installed_embedding(model_name, vector_db) modifies associated sqlite library record inconsistently

1 participant