**refactor: streamline initializeBrainy embedding configuration and cleanup code style**
### Changes: - Removed conditional configuration for `USE_SIMPLE_EMBEDDING` as Universal Sentence Encoder is now the sole embedding option. - Updated comments to reflect the exclusive use of TensorFlow.js for embedding functionality. - Cleaned up unnecessary blank lines and whitespace for improved code readability. ### Purpose: Simplified the `initializeBrainy` function by consolidating embedding configuration and eliminating outdated options. This refinement aligns with the project's transition to TensorFlow-based embeddings and improves code clarity.
This commit is contained in:
parent
71b5e09462
commit
126fe08379
1 changed files with 7 additions and 10 deletions
|
|
@ -45,11 +45,8 @@ export async function initializeBrainy(): Promise<BrainyData> {
|
|||
break;
|
||||
}
|
||||
|
||||
// Configure embedding options
|
||||
if (process.env.USE_SIMPLE_EMBEDDING === 'true') {
|
||||
// Use simple embedding (faster but less accurate)
|
||||
config.useSimpleEmbedding = true;
|
||||
}
|
||||
// Note: Universal Sentence Encoder is now the only embedding option
|
||||
// TensorFlow.js is required for embedding to work
|
||||
|
||||
// Configure HNSW index parameters if provided
|
||||
if (process.env.HNSW_M) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue