mirror of
https://github.com/clucraft/PriceGhost.git
synced 2026-05-18 13:55:16 +02:00
Add per-product AI verification disable option
Users can now disable AI verification for individual products that AI is having trouble with (e.g., Amazon products where AI keeps picking the main buy box price instead of "other sellers"). Changes: - Add ai_verification_disabled column to products table - Add toggle in product detail page under "Advanced Settings" - Pass skip flag to scrapeProductWithVoting - Skip AI verification when flag is set Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
d2e1cc70fc
commit
b9d8d15e68
7 changed files with 147 additions and 6 deletions
|
|
@ -29,14 +29,18 @@ async function checkPrices(): Promise<void> {
|
|||
// Get anchor price for variant products (the price the user confirmed)
|
||||
const anchorPrice = await productQueries.getAnchorPrice(product.id);
|
||||
|
||||
console.log(`[Scheduler] Product ${product.id} - preferredMethod: ${preferredMethod}, anchorPrice: ${anchorPrice}`);
|
||||
// Check if AI verification is disabled for this product
|
||||
const skipAiVerification = await productQueries.isAiVerificationDisabled(product.id);
|
||||
|
||||
console.log(`[Scheduler] Product ${product.id} - preferredMethod: ${preferredMethod}, anchorPrice: ${anchorPrice}, skipAi: ${skipAiVerification}`);
|
||||
|
||||
// Use voting scraper with preferred method and anchor price if available
|
||||
const scrapedData = await scrapeProductWithVoting(
|
||||
product.url,
|
||||
product.user_id,
|
||||
preferredMethod as ExtractionMethod | undefined,
|
||||
anchorPrice || undefined
|
||||
anchorPrice || undefined,
|
||||
skipAiVerification
|
||||
);
|
||||
|
||||
console.log(`[Scheduler] Product ${product.id} - scraped price: ${scrapedData.price?.price}, candidates: ${scrapedData.priceCandidates.map(c => `${c.price}(${c.method})`).join(', ')}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue