fix: allow automatic model downloads without requiring BRAINY_ALLOW_REMOTE_MODELS
Models should download automatically when not present locally. Fixed the environment variable check to only block downloads when explicitly set to 'false' rather than blocking when undefined.
This commit is contained in:
parent
b4f0a1c46b
commit
dd020e0889
1 changed files with 3 additions and 3 deletions
|
|
@ -108,9 +108,9 @@ export class TransformerEmbedding implements EmbeddingModel {
|
|||
if (options.localFilesOnly !== undefined) {
|
||||
// 1. Explicit option takes highest priority
|
||||
localFilesOnly = options.localFilesOnly
|
||||
} else if (process.env.BRAINY_ALLOW_REMOTE_MODELS !== undefined) {
|
||||
// 2. Environment variable override
|
||||
localFilesOnly = process.env.BRAINY_ALLOW_REMOTE_MODELS !== 'true'
|
||||
} else if (process.env.BRAINY_ALLOW_REMOTE_MODELS === 'false') {
|
||||
// 2. Environment variable explicitly disables remote models
|
||||
localFilesOnly = true
|
||||
} else if (process.env.NODE_ENV === 'development') {
|
||||
// 3. Development mode allows remote models
|
||||
localFilesOnly = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue