- Kiosk mode: fullscreen, wake lock, auto-login, context menu block, PWA/Capacitor detection - AI vision: camera photos analyzed by Gemma 3 27B vision model via OpenRouter - AI part classification: auto-suggest name/brand/category when entering part number - Public catalog chatbot: /api/chat endpoint with rate limiting, chat widget on catalog page Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -200,8 +200,9 @@
|
||||
container.insertBefore(div, typing);
|
||||
scrollToBottom();
|
||||
|
||||
// Send to AI as a text description (vision model placeholder)
|
||||
const photoPrompt = 'El usuario envio una foto de una parte automotriz. Describe que parte podria ser y sugiere busquedas.';
|
||||
// Send image to AI vision model for real analysis
|
||||
var imageData = ev.target.result; // full data URL
|
||||
var photoPrompt = 'Identifica esta parte automotriz y sugiere terminos de busqueda.';
|
||||
history.push({ role: 'user', content: photoPrompt });
|
||||
if (history.length > 20) history.splice(0, 2);
|
||||
|
||||
@@ -209,7 +210,7 @@
|
||||
document.getElementById('chatSend').disabled = true;
|
||||
showTyping(true);
|
||||
|
||||
const token = getToken();
|
||||
var token = getToken();
|
||||
fetch('/pos/api/chat', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
@@ -218,6 +219,7 @@
|
||||
},
|
||||
body: JSON.stringify({
|
||||
message: photoPrompt,
|
||||
image: imageData,
|
||||
history: history.slice(-10)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user