fix: update all imports and references from BrainyData to Brainy

- Fixed imports in examples/tests/ to use correct Brainy import
- Fixed imports in tests/benchmarks/ to use correct paths
- Updated bin/brainy-interactive.js to use Brainy instead of BrainyData
- Corrected documentation references throughout codebase
- Removed duplicate imports in benchmark files
- All files now consistently use 'Brainy' class from dist/index.js
This commit is contained in:
David Snelling 2025-09-30 17:09:15 -07:00
parent 791fac54cd
commit 196690863d
77 changed files with 328 additions and 331 deletions

View file

@ -4,8 +4,8 @@
* Quick Performance Test - Find the bottlenecks
*/
import { BrainyData } from '../dist/index.js'
import { MemoryStorage } from '../dist/storage/adapters/memoryStorage.js'
import { Brainy } from '../../dist/index.js'
import { MemoryStorage } from '../../dist/storage/adapters/memoryStorage.js'
async function quickPerf() {
console.log('🚀 Quick Performance Test\n')
@ -34,7 +34,7 @@ async function quickPerf() {
// Mock embedding function that returns instantly
const mockEmbed = async () => new Array(384).fill(0)
const brain = new BrainyData({
const brain = new Brainy({
storage: new MemoryStorage(),
embeddingFunction: mockEmbed,
augmentations: false // Disable augmentations
@ -57,7 +57,7 @@ async function quickPerf() {
// Test 3: With augmentations
console.log('3⃣ Brainy with Augmentations')
const brain2 = new BrainyData({
const brain2 = new Brainy({
storage: new MemoryStorage(),
embeddingFunction: mockEmbed
// Default augmentations enabled
@ -78,7 +78,7 @@ async function quickPerf() {
// Test 4: Real embeddings (the killer)
console.log('4⃣ With Real Embeddings (10 samples)')
const brain3 = new BrainyData({
const brain3 = new Brainy({
storage: new MemoryStorage(),
augmentations: false
// Uses real embedding function