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

@ -9,12 +9,12 @@
#### **1. Constructor & Initialization**
```typescript
// Clean, consistent initialization
const brain = new BrainyData(config?)
const brain = new Brainy(config?)
await brain.init() // Always required
// Storage auto-detection works seamlessly
const brain = new BrainyData({ storage: { forceMemoryStorage: true } })
const brain = new BrainyData({ storage: { path: './my-data' } })
const brain = new Brainy({ storage: { forceMemoryStorage: true } })
const brain = new Brainy({ storage: { path: './my-data' } })
```
#### **2. Data Operations (CRUD)**
@ -135,7 +135,7 @@ brain.storage.vacuum()
#### **1. Beginner Flow (Simple & Intuitive)**
```typescript
// Dead simple - just works
const brain = new BrainyData()
const brain = new Brainy()
await brain.init()
await brain.add('My first document', { nounType: NounType.Document })
@ -147,7 +147,7 @@ const groups = await brain.clusters()
#### **2. Intermediate Flow (More Control)**
```typescript
// Add configuration and options
const brain = new BrainyData({
const brain = new Brainy({
storage: { path: './my-brainy-db' },
neural: { cacheSize: 5000 }
})
@ -267,9 +267,9 @@ try {
### **✅ 4. Type Safety**
```typescript
// Excellent TypeScript support
import { BrainyData, NounType, VerbType } from '@soulcraft/brainy'
import { Brainy, NounType, VerbType } from '@soulcraft/brainy'
const brain = new BrainyData()
const brain = new Brainy()
await brain.add('content', { nounType: NounType.Document, title: 'My Doc' })
// ^^^^^^^^^^^^^^^^ // IDE autocomplete!
```
@ -277,10 +277,10 @@ await brain.add('content', { nounType: NounType.Document, title: 'My Doc' })
### **✅ 5. Flexible Configuration**
```typescript
// Zero-config (just works)
const brain = new BrainyData()
const brain = new Brainy()
// Full control when needed
const brain = new BrainyData({
const brain = new Brainy({
storage: {
adapter: 'file',
path: './my-data',

View file

@ -6,9 +6,9 @@
## Quick Start
```typescript
import { BrainyData } from '@soulcraft/brainy'
import { Brainy } from '@soulcraft/brainy'
const brain = new BrainyData() // Zero config!
const brain = new Brainy() // Zero config!
await brain.init()
// Add data (text auto-embeds!)
@ -248,7 +248,7 @@ Train the relationship scoring model:
#### Initialization
```typescript
const brain = new BrainyData({
const brain = new Brainy({
storage: 'auto', // auto | memory | filesystem | s3
dimensions: 384, // Vector dimensions
cache: true, // Enable caching
@ -264,8 +264,8 @@ await brain.shutdown() // Graceful shutdown
```
#### Static Methods
- `BrainyData.preloadModel()` - Preload ML model
- `BrainyData.warmup()` - Warmup system
- `Brainy.preloadModel()` - Preload ML model
- `Brainy.warmup()` - Warmup system
---