embeddings fix
This commit is contained in:
parent
b689f24502
commit
dad5e5ea0c
@ -37,13 +37,6 @@ export const POST: APIRoute = async ({ request }) => {
|
||||
|
||||
const { embeddingsService } = await import('../../../utils/embeddings.js');
|
||||
|
||||
if (!embeddingsService.isEnabled()) {
|
||||
return new Response(
|
||||
JSON.stringify({ success: false, error: 'Semantic search not available' }),
|
||||
{ status: 400, headers: { 'Content-Type': 'application/json' } }
|
||||
);
|
||||
}
|
||||
|
||||
await embeddingsService.waitForInitialization();
|
||||
|
||||
const similarItems = await embeddingsService.findSimilar(
|
||||
|
@ -263,10 +263,6 @@ class EmbeddingsService {
|
||||
}
|
||||
|
||||
async waitForInitialization(): Promise<void> {
|
||||
/*if (!this.config.enabled) {
|
||||
return Promise.resolve();
|
||||
}*/
|
||||
|
||||
if (this.isInitialized) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user