From c516356f8b300225cf8bbd77b7a780dbf71614ad Mon Sep 17 00:00:00 2001 From: Amruth-Vamshi Date: Thu, 9 Nov 2023 15:52:54 +0530 Subject: [PATCH] removed deleted condtion in history search --- src/modules/prompt-history/prompt-history.service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/prompt-history/prompt-history.service.ts b/src/modules/prompt-history/prompt-history.service.ts index cdfee12..68271ae 100644 --- a/src/modules/prompt-history/prompt-history.service.ts +++ b/src/modules/prompt-history/prompt-history.service.ts @@ -142,8 +142,7 @@ export class PromptHistoryService { FROM prompt_history WHERE - prompt_history."deletedAt" IS NULL -- Added this condition to filter out deleted records - AND 1 - (prompt_history.embedding <=> ${queryEmbedding}) > ${searchQueryDto.similarityThreshold} + 1 - (prompt_history.embedding <=> ${queryEmbedding}) > ${searchQueryDto.similarityThreshold} ORDER BY prompt_history.embedding <=> ${queryEmbedding} LIMIT ${searchQueryDto.matchCount};