mirror of
https://github.com/clucraft/PriceGhost.git
synced 2026-05-18 13:55:16 +02:00
Add AI price verification feature
When enabled, AI verifies every scraped price to ensure accuracy. This catches issues like scraped "savings" amounts instead of actual prices. - Add ai_verification_enabled column to users table - Create verification prompt and functions for Anthropic, OpenAI, Ollama - Integrate verification step into scraper after traditional scraping - Add verification toggle to Settings page (separate from AI extraction) - AI verification is independent of AI extraction fallback Flow: Traditional scraping -> AI verification (if enabled) -> AI extraction fallback (if no price found) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
7afa3ccec3
commit
dc4e7b9665
6 changed files with 278 additions and 4 deletions
|
|
@ -196,6 +196,7 @@ export const settingsApi = {
|
|||
|
||||
updateAI: (data: {
|
||||
ai_enabled?: boolean;
|
||||
ai_verification_enabled?: boolean;
|
||||
ai_provider?: 'anthropic' | 'openai' | 'ollama' | null;
|
||||
anthropic_api_key?: string | null;
|
||||
openai_api_key?: string | null;
|
||||
|
|
@ -213,6 +214,7 @@ export const settingsApi = {
|
|||
// AI Settings types
|
||||
export interface AISettings {
|
||||
ai_enabled: boolean;
|
||||
ai_verification_enabled: boolean;
|
||||
ai_provider: 'anthropic' | 'openai' | 'ollama' | null;
|
||||
anthropic_api_key: string | null;
|
||||
openai_api_key: string | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue