refactor: simplify build system and improve model loading flexibility

- Remove Rollup bundling in favor of direct TypeScript compilation
- Move from bundled models to dynamic model loading with configurable paths
- Add Docker deployment examples and documentation
- Implement robust model loader with fallback mechanisms
- Update storage adapters for better cross-environment compatibility
- Add comprehensive tests for model loading and package installation
- Simplify package.json scripts and remove complex build configurations
- Clean up deprecated demo files and old bundling scripts

BREAKING CHANGE: Models are no longer bundled with the package. They are now loaded dynamically from CDN or custom paths.
This commit is contained in:
David Snelling 2025-08-05 16:09:30 -07:00
parent 89413ebec2
commit 52a43d51d4
51 changed files with 4835 additions and 8007 deletions

View file

@ -1,12 +0,0 @@
{
"name": "universal-sentence-encoder",
"version": "1.0.0",
"description": "Universal Sentence Encoder model for text embeddings",
"dimensions": 512,
"date": "2025-08-01T21:59:56.632Z",
"source": "tensorflow-models/universal-sentence-encoder",
"savedLocally": true,
"savedWith": "manual-embedding",
"embeddingSize": 512,
"approach": "tfhub-reference"
}

View file

@ -1,52 +0,0 @@
{
"format": "graph-model",
"generatedBy": "TensorFlow.js v4.22.0",
"convertedBy": "Brainy download-model script",
"modelTopology": {
"class_name": "GraphModel",
"config": {
"name": "universal-sentence-encoder"
}
},
"userDefinedMetadata": {
"signature": {
"inputs": {
"inputs": {
"name": "inputs",
"dtype": "string",
"shape": [
-1
]
}
},
"outputs": {
"outputs": {
"name": "outputs",
"dtype": "float32",
"shape": [
-1,
512
]
}
}
}
},
"weightsManifest": [
{
"paths": [
"group1-shard1of1.bin"
],
"weights": [
{
"name": "embedding_matrix",
"shape": [
512,
512
],
"dtype": "float32"
}
]
}
],
"modelUrl": "https://tfhub.dev/tensorflow/tfjs-model/universal-sentence-encoder/1/default/1"
}