**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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Configure embedding options
|
// Note: Universal Sentence Encoder is now the only embedding option
|
||||||
if (process.env.USE_SIMPLE_EMBEDDING === 'true') {
|
// TensorFlow.js is required for embedding to work
|
||||||
// Use simple embedding (faster but less accurate)
|
|
||||||
config.useSimpleEmbedding = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Configure HNSW index parameters if provided
|
// Configure HNSW index parameters if provided
|
||||||
if (process.env.HNSW_M) {
|
if (process.env.HNSW_M) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue