**refactor(core): remove verbose logging for Universal Sentence Encoder**
- **Logging Cleanup**: - Removed redundant `console.log` statements in `brainyData.ts` and `embedding.ts` related to Universal Sentence Encoder initialization and load function detection. - Replaced detailed logs with concise comments to streamline debugging and reduce noisy outputs. - **Purpose**: - Improves code readability, reduces runtime logging noise, and aligns logging verbosity with the project's streamlined debugging practices.
This commit is contained in:
parent
e12ecf8d72
commit
51892e46b8
2 changed files with 5 additions and 29 deletions
|
|
@ -255,10 +255,10 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
|
|||
// Pre-load the embedding model early to ensure it's always available
|
||||
// This helps prevent issues with the Universal Sentence Encoder not being loaded
|
||||
try {
|
||||
console.log('Pre-loading Universal Sentence Encoder model...')
|
||||
// Pre-loading Universal Sentence Encoder model
|
||||
// Call embedding function directly to avoid circular dependency with embed()
|
||||
await this.embeddingFunction('')
|
||||
console.log('Universal Sentence Encoder model loaded successfully')
|
||||
// Universal Sentence Encoder model loaded successfully
|
||||
} catch (embedError) {
|
||||
console.warn(
|
||||
'Failed to pre-load Universal Sentence Encoder:',
|
||||
|
|
@ -266,7 +266,7 @@ export class BrainyData<T = any> implements BrainyDataInterface<T> {
|
|||
)
|
||||
|
||||
// Try again with a retry mechanism
|
||||
console.log('Retrying Universal Sentence Encoder initialization...')
|
||||
// Retrying Universal Sentence Encoder initialization
|
||||
try {
|
||||
// Wait a moment before retrying
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue