Progress
This commit is contained in:
@@ -357,6 +357,17 @@ class ImprovedMicroTaskAIPipeline {
|
||||
let candidateConcepts: any[] = [];
|
||||
let selectionMethod = 'unknown';
|
||||
|
||||
// WAIT for embeddings initialization if embeddings are enabled
|
||||
if (process.env.AI_EMBEDDINGS_ENABLED === 'true') {
|
||||
try {
|
||||
console.log('[AI PIPELINE] Waiting for embeddings initialization...');
|
||||
await embeddingsService.waitForInitialization();
|
||||
console.log('[AI PIPELINE] Embeddings ready, proceeding with similarity search');
|
||||
} catch (error) {
|
||||
console.error('[AI PIPELINE] Embeddings initialization failed, falling back to full dataset:', error);
|
||||
}
|
||||
}
|
||||
|
||||
if (embeddingsService.isEnabled()) {
|
||||
const embeddingsStart = Date.now();
|
||||
const similarItems = await embeddingsService.findSimilar(
|
||||
@@ -425,7 +436,7 @@ class ImprovedMicroTaskAIPipeline {
|
||||
);
|
||||
}
|
||||
} else {
|
||||
console.log(`[AI PIPELINE] Embeddings disabled, using full dataset`);
|
||||
console.log(`[AI PIPELINE] Embeddings disabled or not ready, using full dataset`);
|
||||
candidateTools = toolsData.tools;
|
||||
candidateConcepts = toolsData.concepts;
|
||||
selectionMethod = 'full_dataset';
|
||||
|
||||
Reference in New Issue
Block a user