fix: Preserve neural intelligence metadata in verb storage
Critical fix for neural features that were designed but not properly saved: - Neural metadata (neuralEnhanced, inferenceScore) now properly preserved - Intelligent relate() enhancements now persist to storage - Metadata merge ensures all neural fields are retained - Backwards compatibility maintained with data field This ensures all the neural intelligence features from 1.3.0 work correctly.
This commit is contained in:
parent
ebcfbb7ad2
commit
c9d84ef25b
1 changed files with 5 additions and 2 deletions
|
|
@ -4048,6 +4048,7 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
|
|||
}
|
||||
|
||||
// Create complete verb metadata separately
|
||||
// Merge original metadata with system metadata to preserve neural enhancements
|
||||
const verbMetadata = {
|
||||
sourceId: sourceId,
|
||||
targetId: targetId,
|
||||
|
|
@ -4064,7 +4065,9 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
|
|||
createdAt: timestamp,
|
||||
updatedAt: timestamp,
|
||||
createdBy: getAugmentationVersion(service),
|
||||
data: options.metadata // Store the original metadata in the data field
|
||||
// Merge original metadata to preserve neural enhancements from relate()
|
||||
...(options.metadata || {}),
|
||||
data: options.metadata // Also store in data field for backwards compatibility
|
||||
}
|
||||
|
||||
// Add to index
|
||||
|
|
@ -4097,7 +4100,7 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
|
|||
createdAt: verbMetadata.createdAt,
|
||||
updatedAt: verbMetadata.updatedAt,
|
||||
createdBy: verbMetadata.createdBy,
|
||||
metadata: verbMetadata.data,
|
||||
metadata: verbMetadata, // Use full metadata with neural enhancements
|
||||
data: verbMetadata.data,
|
||||
embedding: hnswVerb.vector
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue