mirror of
https://github.com/clucraft/PriceGhost.git
synced 2026-04-25 00:36:32 +02:00
Skip AI verification when multiple price candidates exist
When the scraper finds multiple valid prices (e.g., Amazon main price + other sellers), skip AI verification entirely. AI was "correcting" valid alternative prices to the main buy box price. Now with multiple candidates, users see all options in the modal and choose themselves - no AI interference. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
3a3291a779
commit
6327fd6cf1
1 changed files with 4 additions and 1 deletions
|
|
@ -1637,7 +1637,10 @@ export async function scrapeProductWithVoting(
|
|||
}
|
||||
|
||||
// If we have a price but AI is available, verify it
|
||||
if (result.price && userId && html && !result.aiStatus) {
|
||||
// SKIP verification if we have multiple candidates - let user choose from modal instead
|
||||
// This prevents AI from "correcting" valid alternative prices (e.g., other sellers on Amazon)
|
||||
const hasMultipleCandidates = allCandidates.length > 1;
|
||||
if (result.price && userId && html && !result.aiStatus && !hasMultipleCandidates) {
|
||||
try {
|
||||
const { tryAIVerification } = await import('./ai-extractor');
|
||||
const verifyResult = await tryAIVerification(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue