feat(tools): add background embedding queue for thoughts
Some checks failed
CI / build-and-test (push) Failing after -29m22s
Some checks failed
CI / build-and-test (push) Failing after -29m22s
* Implement QueueThought method in BackfillTool for embedding generation * Update CaptureTool to utilize embedding queuer for failed embeddings * Add EmbeddingStatus field to Thought type for tracking embedding state
This commit is contained in:
@@ -58,6 +58,12 @@ func (db *DB) InsertThought(ctx context.Context, thought thoughttypes.Thought, e
|
||||
return thoughttypes.Thought{}, fmt.Errorf("commit thought insert: %w", err)
|
||||
}
|
||||
|
||||
if len(thought.Embedding) > 0 {
|
||||
created.EmbeddingStatus = "done"
|
||||
} else {
|
||||
created.EmbeddingStatus = "pending"
|
||||
}
|
||||
|
||||
return created, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user