fix: Resolve soft delete and add encrypted config support
- Fix soft delete functionality by filtering out deleted items in search results - Add support for encrypted configuration storage and retrieval - Copy test suite and vitest config to ensure all functionality works - Maintain all core brainy functionality during repository cleanup
This commit is contained in:
parent
7432fab3bc
commit
3d80df1726
62 changed files with 13792 additions and 6 deletions
37
tests/verify-model-loading.js
Normal file
37
tests/verify-model-loading.js
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Simple script to verify model loading behavior
|
||||
* Run with: node tests/verify-model-loading.js
|
||||
*/
|
||||
|
||||
import { BrainyData } from '../dist/unified.js'
|
||||
|
||||
console.log('Testing Brainy model loading behavior...\n')
|
||||
|
||||
const db = new BrainyData({
|
||||
forceMemoryStorage: true,
|
||||
dimensions: 512
|
||||
})
|
||||
|
||||
console.log('Initializing BrainyData...')
|
||||
await db.init()
|
||||
|
||||
console.log('\nAttempting to embed text...')
|
||||
const text = 'This is a test sentence for embedding'
|
||||
const id = await db.add({ content: text })
|
||||
|
||||
console.log(`\n✅ Successfully added text with ID: ${id}`)
|
||||
|
||||
// Test search
|
||||
const results = await db.search('test sentence', 1)
|
||||
console.log(`\n✅ Search returned ${results.length} result(s)`)
|
||||
|
||||
console.log('\n---')
|
||||
console.log('Model loading test complete!')
|
||||
console.log('\nNOTE: Check the console output above to see:')
|
||||
console.log('1. If @soulcraft/brainy-models was found and used (best performance)')
|
||||
console.log('2. If fallback to URL loading occurred (with warning)')
|
||||
console.log('3. Verification that the correct model was loaded')
|
||||
|
||||
process.exit(0)
|
||||
Loading…
Add table
Add a link
Reference in a new issue