Simplify image extraction to single imageUrl per item
This commit is contained in:
parent
89adfbc92e
commit
dfb264eba6
1 changed files with 1 additions and 1 deletions
|
|
@ -256,7 +256,7 @@
|
|||
<cfset arrayAppend(response.steps, "Found " & arrayLen(h3Texts) & " h3 tags in HTML")>
|
||||
|
||||
<!--- System prompt for URL analysis --->
|
||||
<cfset systemPrompt = "You are an expert at extracting structured menu data from restaurant website HTML. Extract ALL menu data visible in the HTML. Return valid JSON with these keys: business (object with name, address, phone, hours, brandColor), categories (array of category objects - each with name and optional subcategories array), modifiers (array of modifier templates with name, required boolean, appliesTo, categoryName if applicable, and options array), items (array with name, description, price, category, subcategory if applicable, modifiers array, and images object with all image URLs found). CRITICAL: Extract EVERY menu item visible in the HTML - do not skip any items. For categories: Look for h3 headers inside menu sections - these are subcategories. Group them under parent categories. Format: [{""name"":""Beverages"",""subcategories"":[{""name"":""Beer""},{""name"":""Wine""}]},{""name"":""Food""}]. For images: Extract ALL image URLs for each item as an object with keys like src, srcset, small, medium, large. Parse srcset attributes. For brandColor: suggest a vibrant hex color (6 digits, no hash symbol) based on the restaurant style. For hours: format as ""Mon-Fri 10:30am-10pm, Sat 11am-10pm, Sun 11am-9pm"". Include ALL days visible. For prices: extract as numbers (e.g., 12.99). For modifier options: use format {""name"": ""option"", ""price"": 0}. Return ONLY valid JSON, no markdown, no explanation.">
|
||||
<cfset systemPrompt = "You are an expert at extracting structured menu data from restaurant website HTML. Extract ALL menu data visible in the HTML. Return valid JSON with these keys: business (object with name, address, phone, hours, brandColor), categories (array of category objects - each with name and optional subcategories array), modifiers (array of modifier templates with name, required boolean, appliesTo, categoryName if applicable, and options array), items (array with name, description, price, category, subcategory if applicable, modifiers array, and imageUrl if found). CRITICAL: Extract EVERY menu item visible in the HTML - do not skip any items. For categories: Look for h3 headers inside menu sections - these are subcategories. Group them under parent categories. Format: [{""name"":""Beverages"",""subcategories"":[{""name"":""Beer""},{""name"":""Wine""}]},{""name"":""Food""}]. For imageUrl: return the highest quality image URL for each item (prefer srcset largest size, or src if no srcset). For brandColor: suggest a vibrant hex color (6 digits, no hash symbol) based on the restaurant style. For hours: format as ""Mon-Fri 10:30am-10pm, Sat 11am-10pm, Sun 11am-9pm"". Include ALL days visible. For prices: extract as numbers (e.g., 12.99). For modifier options: use format {""name"": ""option"", ""price"": 0}. Return ONLY valid JSON, no markdown, no explanation.">
|
||||
|
||||
<!--- Build message content --->
|
||||
<cfset messagesContent = arrayNew(1)>
|
||||
|
|
|
|||
Reference in a new issue