diff --git a/src/handlers/ask-llm.ts b/src/handlers/ask-llm.ts index fa8a883..cf6aeae 100644 --- a/src/handlers/ask-llm.ts +++ b/src/handlers/ask-llm.ts @@ -42,12 +42,12 @@ export async function askGpt(context: Context, question: string, formattedChat: let similarComments: CommentSimilaritySearchResult[] = []; let similarIssues: IssueSimilaritySearchResult[] = []; try { - similarComments = (await context.adapters.supabase.comment.findSimilarComments(question, similarityThreshold, "")) || []; + similarComments = (await context.adapters.supabase.comment.findSimilarComments(question, 1 - similarityThreshold, "")) || []; } catch (error) { context.logger.error(`Error fetching similar comments: ${(error as Error).message}`); } try { - similarIssues = (await context.adapters.supabase.issue.findSimilarIssues(question, similarityThreshold, "")) || []; + similarIssues = (await context.adapters.supabase.issue.findSimilarIssues(question, 1 - similarityThreshold, "")) || []; } catch (error) { context.logger.error(`Error fetching similar issues: ${(error as Error).message}`); } diff --git a/src/types/plugin-inputs.ts b/src/types/plugin-inputs.ts index 694bb50..a98f0be 100644 --- a/src/types/plugin-inputs.ts +++ b/src/types/plugin-inputs.ts @@ -22,7 +22,7 @@ export interface PluginInputs