feat: Add Google Cloud Storage CDN for models.soulcraft.com
- Primary source: models.soulcraft.com on GCS - Backup: GitHub releases - Fallback: Hugging Face - Immutable with SHA256 verification
This commit is contained in:
parent
a9c5fd0eeb
commit
1096d285f5
13 changed files with 1058 additions and 15 deletions
4
dist/utils/embedding.js
vendored
4
dist/utils/embedding.js
vendored
|
|
@ -3,6 +3,7 @@
|
|||
* Complete rewrite to eliminate TensorFlow.js and use ONNX-based models
|
||||
*/
|
||||
import { isBrowser } from './environment.js';
|
||||
import { ModelManager } from '../embeddings/model-manager.js';
|
||||
// @ts-ignore - Transformers.js is now the primary embedding library
|
||||
import { pipeline, env } from '@huggingface/transformers';
|
||||
/**
|
||||
|
|
@ -192,6 +193,9 @@ export class TransformerEmbedding {
|
|||
}
|
||||
// Always use real implementation - no mocking
|
||||
try {
|
||||
// Ensure models are available (downloads if needed)
|
||||
const modelManager = ModelManager.getInstance();
|
||||
await modelManager.ensureModels(this.options.model);
|
||||
// Resolve device configuration and cache directory
|
||||
const device = await resolveDevice(this.options.device);
|
||||
const cacheDir = this.options.cacheDir === './models'
|
||||
|
|
|
|||
2
dist/utils/embedding.js.map
vendored
2
dist/utils/embedding.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue