{"id":29833,"date":"2024-09-26T13:39:40","date_gmt":"2024-09-26T11:39:40","guid":{"rendered":"https:\/\/www.codemotion.com\/magazine\/?p=29833"},"modified":"2024-09-26T14:14:00","modified_gmt":"2024-09-26T12:14:00","slug":"guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador","status":"publish","type":"post","link":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/","title":{"rendered":"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador"},"content":{"rendered":"\n<p>\u00a1Descubramos c\u00f3mo podemos crear una conversaci\u00f3n aut\u00e9ntica con un asistente virtual basado en un modelo de IA similar a ChatGPT, sin tener que comunicarnos con un servidor, sino completamente dentro del navegador!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u00bfEs realmente posible hacer esto sin costo alguno completamente del lado del cliente con JavaScript? \u00bfRealmente llegaremos a algo \"similar a ChatGPT\"? \u00bfNos dirigimos hacia un futuro con asistentes virtuales fuera de l\u00ednea y control total de la privacidad?<\/pre>\n\n\n\n<p>Responderemos a estas preguntas con este tutorial especializado en  Transformers.js, centr\u00e1ndonos en crear un chatbot basado en un modelo LLM real de Hugging Face.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-guia-practica-para-un-chatbot-basado-en-ia-integrado-en-una-pagina-web\">Gu\u00eda pr\u00e1ctica para un Chatbot basado en IA integrado en una p\u00e1gina web<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-requisitos\">Requisitos<\/h3>\n\n\n\n<p>\u00a1Esta gu\u00eda, al igual que la anterior, est\u00e1 dise\u00f1ada para ser clara y accesible!<\/p>\n\n\n\n<p>Por ejemplo, no usaremos ning\u00fan agrupador, sino una simple carpeta \/public que se servir\u00e1 con tu servidor web favorito.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ingredientes\">Ingredientes<\/h3>\n\n\n\n<p>Para nuestra aplicaci\u00f3n web, necesitaremos tres ingredientes principales correspondientes a los cuatro archivos del proyecto en los que trabajaremos:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">.<code>\/public\/<br>    index.html<br>    worker.js<br>    app.js<br>    style.css<br><\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-interfaz-minimalista-para-el-chat\">Interfaz Minimalista para el Chat:<\/h4>\n\n\n\n<p>Dentro de nuestro <code>index.html<\/code> tendremos:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>#chat-messages<\/code> donde aparecer\u00e1n los mensajes del usuario, asistente virtual y del sistema (con diferentes estilos).<\/li>\n\n\n\n<li><code>#chat-input-container<\/code> para enviar un mensaje desde el teclado y con un bot\u00f3n.<\/li>\n<\/ul>\n\n\n\n<p>Un web worker (cargado como m\u00f3dulo): contendr\u00e1 nuestro modelo de IA y nos permitir\u00e1 consultarlo sin bloquear la interfaz de usuario del hilo principal.<\/p>\n\n\n\n<p>La l\u00f3gica de la aplicaci\u00f3n de un chat cl\u00e1sico: el usuario puede enviar sus mensajes, y tambi\u00e9n lo har\u00e1 el modelo de IA.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-preparacion\">Preparaci\u00f3n<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-un-chat-simple\">Un chat simple<\/h4>\n\n\n\n<p>Para este experimento, nos limitaremos a un contenedor para albergar todo el chat con un <code>#chat-header<\/code>, <code>#chat-messages<\/code> y <code>#chat-input-container<\/code> dentro.<\/p>\n\n\n\n<p>Agreguemos todo lo que necesitamos a nuestro <code>index.html<\/code>:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>&lt;div id=\"container\"><br>    &lt;div id=\"chat-container\"><br>        &lt;div id=\"chat-header\"><br>            &lt;h2>Mi primer LLM&lt;\/h2><br>        &lt;\/div><br>        &lt;div id=\"chat-messages\" class=\"chat-messages\"><br>            &lt;!-- los mensajes aparecer\u00e1n aqu\u00ed --><br>        &lt;\/div><br>        &lt;div id=\"chat-input-container\"><br>            &lt;input type=\"text\" id=\"chat-input\" placeholder=\"Escribe tu mensaje...\"><br>            &lt;button id=\"send-button\" disabled>Enviar&lt;\/button><br>        &lt;\/div><br>    &lt;\/div><br>&lt;\/div><br><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-enviando-y-recibiendo-mensajes\">Enviando y recibiendo mensajes<\/h3>\n\n\n\n<p>Ahora a\u00f1adamos a nuestro <code>app.js<\/code> el sistema para enviar mensajes escritos por el usuario en su caja. Nos conectaremos a su env\u00edo para enviar el mensaje a nuestra IA\u2026 pero primero, creemos un sistema simple para enviar y recibir mensajes.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>document.addEventListener(\"DOMContentLoaded\", () => {<br>  const sendButton = document.getElementById(\"send-button\");<br>  const chatInput = document.getElementById(\"chat-input\");<br>  const chatMessages = document.getElementById(\"chat-messages\");<br><br>  const disableUI = () => {<br>    sendButton.setAttribute(\"disabled\", true);<br>    sendButton.innerText = \"...\";<br>  };<br><br>  const enableUI = () => {<br>    sendButton.removeAttribute(\"disabled\");<br>    sendButton.innerText = \"Enviar\";<br>  };<br><br>  const chat = (text) => {<br>    setTimeout(() => {<br>      addMessage(\"Hola mundo\", \"assistant\");<br>    }, 1000);<br>  };<br><br>  const download = (modelURL) => {<br>    disableUI();<br>    setTimeout(() => {<br>      addMessage(<br>        '&lt;small id=\"downloading-message\">Descargando modelo...&lt;\/small>',<br>        \"system\"<br>      );<br>    }, 1000);<br><br>    setTimeout(() => {<br>      addMessage(<br>        `&lt;small>\u00a1Modelo listo! M\u00e1s informaci\u00f3n aqu\u00ed &lt;a href=\"https:\/\/huggingface.co\/${modelURL}\" target=\"_blank\">${modelURL}&lt;\/a>&lt;\/small>`,<br>        \"system\"<br>      );<br>      enableUI();<br>    }, 2000);<br>  };<br><br>  const addMessage = (message, role) => {<br>    const newMessageElement = document.createElement(\"div\");<br>    newMessageElement.classList.add(\"chat-message\");<br>    newMessageElement.classList.add(role);<br><br>    newMessageElement.innerHTML = message;<br>    chatMessages.appendChild(newMessageElement);<br>    chatMessages.scrollTop = chatMessages.scrollHeight;<br>    return newMessageElement;<br>  };<br><br>  const sendMessage = () => {<br>    disableUI();<br><br>    const question = chatInput.value;<br><br>    addMessage(question, \"user\");<br>    chat(question);<br>    chatInput.value = \"\";<br>  };<br><br>  sendButton.addEventListener(\"click\", sendMessage);<br><br>  chatInput.addEventListener(\"keypress\", (event) => {<br>    if (event.key === \"Enter\") {<br>      sendMessage();<br>    }<br>  });<br><br>  download(\"HF_USER\/HF_MODEL\");<br>});<br><\/code><\/pre>\n\n\n\n<p>Con un toque de CSS, \u00a1tomar\u00e1 la apariencia y el comportamiento de un chat cl\u00e1sico!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>body {<br>    margin: 0;<br>    font-family: system-ui;<br>}<br><br>a, a:visited, a:focus  {<br>    color: #ff5c00;<br>}<br><br>#container {<br>    display: flex;<br>    width: 100lvw;<br>    height: 100lvh;<br>    justify-content: center;<br>    align-items: center;<br>    background-color: #333;<br>}<br><br>#chat-container {<br>    display: flex;<br>    width: 60vw;<br>    flex-direction: column;<br>    max-width: 80%;<br>    max-height: 80%;<br>    background-color: white;<br>    padding: 1rem;<br>    border: 3px solid #666;<br>}<br><br>#chat-header {<br>    display: flex;<br>    justify-content: space-between;<br>}<br><br>#chat-header button {<br>    color: #ff5c00;<br>    background-color: transparent;<br>    border: 0;<br>    font-size: 3rem;<br>    padding: 0;<br>    margin: 0;<br>}<br><br>#chat-messages {<br>    height: 50vh;<br>    overflow-y: auto;<br>    display: flex;<br>    flex-direction: column;<br>}<br><br>#chat-input-container {<br>    display: flex;<br>}<br><br>#chat-input {<br>    width: 100%;<br>}<br><br>input[type=text], button {<br>    font-size: 1rem;<br>    border: 1px solid #ff5c00;<br>    padding: 1rem;<br>    margin: 1rem;<br>}<br><br>button {    <br>    background-color: #ff5c00;<br>    color: white;<br>    cursor: pointer;<br>}<br><br>button:disabled {  <br>    background-color: white;<br>    cursor: wait;<br>    color: #ff5c00;<br>    border: 1px dashed #ff5c00;<br>}<br><br>input[type=text]:disabled {  <br>    background-color: white;<br>    cursor: wait;<br>    color: #ff5c00;<br>    border: 1px dashed #ff5c00;<br>}<br><br>div.chat-message {<br>    padding: 1rem;<br>    margin-bottom: 1rem;<br>    white-space: break-spaces;<br>    width: 80%;<br>}<br><br>div.chat-message.user {<br>    background-color: antiquewhite;<br>    align-self: flex-end;<br>}<br><br>div.chat-message.assistant {<br>    background-color: rgb(249, 205, 147);<br>    align-self: flex-start;<br>}<br><br>div.chat-message.system {<br>    margin: 0;<br>    color: #666;<br>    font-family: monospace;<br>    padding: 0.5rem;<br>}<br><\/code><\/pre>\n\n\n\n<p>\u00a1La parte exterior est\u00e1 lista! \u00bfNo puedes ya saborear el resultado? \ud83e\udd24<\/p>\n\n\n\n<p>\u00a1Estamos listos para el sistema de comunicaci\u00f3n real con nuestro modelo de IA!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"957\" height=\"506\" src=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/09\/image-2.png\" alt=\"\" class=\"wp-image-29851\" srcset=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/09\/image-2.png 957w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/09\/image-2-300x159.png 300w, https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/09\/image-2-768x406.png 768w\" sizes=\"auto, (max-width: 957px) 100vw, 957px\" \/><figcaption class=\"wp-element-caption\">\u00a1Estamos listos para el sistema de comunicaci\u00f3n real con nuestro modelo de IA!<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-ejecutando-un-modelo-de-ia-dentro-de-un-web-worker\">Ejecutando un Modelo de IA Dentro de un Web Worker \ud83c\udf36\ufe0f \ud83c\udf36\ufe0f \ud83c\udf36\ufe0f<\/h3>\n\n\n\n<p>Hemos llegado a la parte m\u00e1s emocionante de la receta: crear un web worker para descargar y ejecutar el modelo LLM en el navegador sin bloquear el hilo principal.<\/p>\n\n\n\n<p>\u00bfNo conoces los Web Workers? \u00a1Es una gran oportunidad para probarlos!<\/p>\n\n\n\n<p>En el archivo <code>app.js<\/code>, incluiremos el archivo <code>worker.js<\/code> como un m\u00f3dulo:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>var aiWorker = new Worker('worker.js', {<br>    type: \"module\"<br>});<br><\/code><\/pre>\n\n\n\n<p>Implementemos las dos funciones que nos permitir\u00e1n enviar mensajes al web worker utilizando el m\u00e9todo <code>postMessage()<\/code>, reemplazando los falsos:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>\/\/ Para enviar mensajes a la IA<br>const chat = (message) => {<br>  aiWorker.postMessage({<br>    action: \"chat\",<br>    content: message,<br>  });<br>};<br>\/\/ Para cargar el modelo de IA: sucede solo la primera vez<br>const download = (modelURL) => {<br>  addMessage(<br>    '&lt;small id=\"downloading-message\">Descargando modelo...&lt;\/small>',<br>    \"system\"<br>  );<br>  aiWorker.postMessage({<br>    action: \"download\",<br>    model: modelURL,<br>  });<br>};<br><\/code><\/pre>\n\n\n\n<p>Para escuchar las respuestas del Web Worker, simplemente necesitamos agregar un listener de eventos que nos informar\u00e1 de cada mensaje. Ten en cuenta que el evento siempre es &#8220;message&#8221;, pero el contenido pasado al callback contendr\u00e1 un objeto que definir\u00e1s: en la pr\u00e1ctica, \u00a1puedes inventar tu propio protocolo formado por par\u00e1metros y banderas!<\/p>\n\n\n\n<p>Para esta receta, solo necesitamos recibir dos tipos de mensajes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Si la respuesta contiene la propiedad de estado, entonces es la se\u00f1al de que el modelo est\u00e1 listo (es decir, la respuesta al mensaje con action: &#8216;download&#8217; enviado por nosotros una vez que se carga app.js).<\/li>\n\n\n\n<li>De lo contrario, es el texto generado por el modelo y contenido en la propiedad result.<\/li>\n<\/ul>\n\n\n\n<p>Veamos nuestro sistema completo de recepci\u00f3n de mensajes con las reacciones correspondientes de nuestra interfaz de usuario:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>aiWorker.addEventListener(\"message\", (event) => {<br>  const aiResponse = event.data;<br><br>  if (aiResponse.status == \"ready\") {<br>    addMessage(<br>      `&lt;small>\u00a1Modelo listo! M\u00e1s informaci\u00f3n aqu\u00ed &lt;a href=\"https:\/\/huggingface.co\/${aiResponse.modelURL}\" target=\"_blank\">${aiResponse.modelURL}&lt;\/a>&lt;\/small>`,<br>      \"system\"<br>    );<br>  } else {<br>    const result = aiResponse.result;<br>    addMessage(result, 'assistant');<br>    enableUI();<br>  }<br>});<br><br>\/\/ \u00a1todo comienza con esta solicitud!<br>download('Felladrin\/onnx-Pythia-31M-Chat-v1');<br><\/code><\/pre>\n\n\n\n<p>\u00a1S\u00ed, lo le\u00edste bien: tenemos un par\u00e1metro modelURL! \u00a1Unos pocos pasos y descubriremos para qu\u00e9 sirve, pero puedes imaginarlo! \ud83e\udd13<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Web Worker Repleto de un Chatbot Real<\/h3>\n\n\n\n<p>\u00a1Todo est\u00e1 listo para dar inteligencia a nuestro asistente virtual basado en modelos de generaci\u00f3n de texto (LLM) cargados completamente en el navegador gracias a Transformers.js!<\/p>\n\n\n\n<p>Primero, carguemos la \u00faltima versi\u00f3n de Transformers.js directamente desde un servicio CDN. \u00a1Atenci\u00f3n! \ud83d\udd25 No te quemes: podemos cargar esta u otras bibliotecas de esta manera exclusivamente porque cargamos el Web Worker con la opci\u00f3n type: &#8220;module&#8221;! \ud83d\ude42\u200d\u2195\ufe0f<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>import {<br>  pipeline,<br>  env,<br>} from \"https:\/\/cdn.jsdelivr.net\/npm\/@xenova\/transformers@2.17.1\";<br><br>env.allowLocalModels = false; \/\/ \u00a1usaremos modelos remotos!<br><\/code><\/pre>\n\n\n\n<p>Ahora, todo lo que tenemos que hacer es implementar nuestra pipeline como en los ejemplos de la documentaci\u00f3n oficial, pero dentro del web worker y cuando la aplicaci\u00f3n lo solicite.<\/p>\n\n\n\n<p>La funci\u00f3n downloadModel descargar\u00e1 los archivos del modelo desde Hugging Face y finalmente crear\u00e1 nuestro generador, que es una pipeline de generaci\u00f3n de texto.<\/p>\n\n\n\n<p>\u00a1Seguramente has notado <code>async<\/code> y <code>await<\/code>! Cuando descargamos el modelo, el Web Worker esperar\u00e1 a que la descarga se complete y luego notificar\u00e1 a nuestra aplicaci\u00f3n que todo est\u00e1 listo con <code>self.postMessage()<\/code> con la propiedad de estado: &#8220;ready&#8221; (que es exactamente lo que nuestra l\u00f3gica de aplicaci\u00f3n est\u00e1 esperando para activar la interfaz de usuario y as\u00ed poder usar el chat).<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>var generator;<br><br>const downloadModel = async (modelURL) => {<br>  generator = await pipeline(\"text-generation\", modelURL);<br><br>  self.postMessage({<br>    status: \"ready\",<br>    task: \"text-generation\",<br>    modelURL: modelURL,<br>  });<br>};<br><\/code><\/pre>\n\n\n\n<p>Aqu\u00ed es donde ocurre la magia de los modelos de generaci\u00f3n de texto y su capacidad para parecer &#8220;inteligentes&#8221;: \u00a1qu\u00e9 emocionante!<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>const generateResponse = async (content) => {<br>  \/\/ los modelos de generaci\u00f3n de texto para chatbots toman un chat como entrada<br>  const messages = [<br>    {<br>      role: \"system\",<br>      content: \"Eres un asistente muy conocedor y amigable.\",<br>    },<br>    {<br>      role: \"user\",<br>      content: content,<br>    },<br>  ];<br><br>  \/\/ Los mensajes del chat con sus roles se alimentan a un<br>  \/\/ tokenizador especial espec\u00edfico de ese modelo que los transformar\u00e1 en vectores (embedding)<br>  const textInput = generator.tokenizer.apply_chat_template(messages, {<br>    tokenize: false,<br>    add_generation_prompt: true,<br>  });<br><br>  \/\/ \u00a1la pipeline en acci\u00f3n! Aqu\u00ed es donde podemos pasar muchos par\u00e1metros para cambiar el resultado de la generaci\u00f3n de texto<br>  const output = await generator(textInput, {<br>    max_new_tokens: 64,<br>    do_sample: true,<br>  });<br><br>  \/\/ La conversaci\u00f3n se nos devuelve en un formato espec\u00edfico del modelo<br>  \/\/ pero al profundizar en la tarjeta en Hugging Face encontraremos toda la informaci\u00f3n<br>  \/\/ y podemos extraer el contenido de la \u00faltima respuesta.<br><br>  \/\/ En este momento, a\u00fan no hay consenso sobre c\u00f3mo deber\u00eda ser una plantilla de chat, pero para extraer la \u00faltima frase (es decir, la respuesta de la IA) simplemente corta lo que sigue a la \u00faltima ocurrencia de la cadena `\"assistant\\n\"` por ejemplo as\u00ed:<br><br>  const conversation = output[0].generated_text;<br>  const start = conversation.lastIndexOf(\"assistant\\n\");<br>  const lastMessage = conversation<br>    .substr(start)<br>    .replace(\"assistant\\n\", \"\");<br><br>  \/\/ todo listo para enviar la respuesta generada por la IA<br>  self.postMessage({<br>    result: lastMessage,<br>  });<br>};<br><\/code><\/pre>\n\n\n\n<p>Todo lo que queda es amalgamar el Web Worker con las solicitudes de nuestra app.js.<\/p>\n\n\n\n<p>Hemos preparado todo previamente para enviar dos mensajes action: &#8216;download&#8217; y action: &#8216;chat&#8217;, y aqu\u00ed no hacemos m\u00e1s que recibirlos y reaccionar en consecuencia.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>self.addEventListener(\"message\", (event) => {<br>  const userRequest = event.data;<br><br>  if (userRequest.action == \"download\") {<br>    const modelURL = userRequest.modelURL;<br>    downloadModel(modelURL);<br><br>  } else if (userRequest.action == \"chat\") {<br>    const content = userRequest.content;<br><br>    generateResponse(content);<br>  }<br>});<br><\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Resultado Final y Observaciones<\/h3>\n\n\n\n<p>Cuando interact\u00faas por primera vez con tu chatbot, es posible que encuentres que sus respuestas son un poco limitadas o extra\u00f1as. Esto es normal para un modelo peque\u00f1o, y es importante entender por qu\u00e9:<\/p>\n\n\n\n<p><strong>El Tama\u00f1o del Modelo Importa:<\/strong> El modelo que usamos (Felladrin\/onnx-Pythia-31M-Chat-v1) es muy peque\u00f1o, solo tiene alrededor de 31 millones de par\u00e1metros. Si bien esto hace que sea r\u00e1pido de cargar y ejecutar en un navegador, limita significativamente sus capacidades.<\/p>\n\n\n\n<p><strong>Mejorando Respuestas:<\/strong> Puedes ajustar algunos par\u00e1metros para potencialmente mejorar las salidas:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><code>const output = await generator(textInput, {<br>    max_new_tokens: 1024, \/\/ Permite respuestas m\u00e1s largas<br>    repetition_penalty: 1.2, \/\/ Reduce la repetici\u00f3n de palabras<br>    do_sample: true,<br>});<br><\/code><\/pre>\n\n\n\n<p><strong>Modelos M\u00e1s Grandes, Mejores Resultados:<\/strong> Para respuestas m\u00e1s coherentes y capaces, considera usar modelos m\u00e1s grandes:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Felladrin\/onnx-TinyMistral-248M-Chat-v2 (248 millones de par\u00e1metros)<\/li>\n\n\n\n<li>Xenova\/Qwen1.5-0.5B-Chat (500 millones de par\u00e1metros)<\/li>\n<\/ul>\n\n\n\n<p>Estos modelos m\u00e1s grandes tardar\u00e1n m\u00e1s en cargar, pero ofrecer\u00e1n un rendimiento significativamente mejorado.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Siguientes Pasos y Desaf\u00edos<\/h3>\n\n\n\n<p>Ahora que has construido un chatbot de IA b\u00e1sico, aqu\u00ed hay algunas formas de expandir tu proyecto:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Animaciones Suaves:<\/strong> Implementa una animaci\u00f3n de escritura para las respuestas del chatbot para que la interacci\u00f3n se sienta m\u00e1s natural.<\/li>\n\n\n\n<li><strong>Integraci\u00f3n del Lado del Servidor:<\/strong> Crea un backend en Python para interactuar con modelos de lenguaje a\u00fan m\u00e1s grandes (7-8B par\u00e1metros) para capacidades m\u00e1s avanzadas.<\/li>\n\n\n\n<li><strong>Asistentes Especializados:<\/strong> Adapta el chatbot para prop\u00f3sitos espec\u00edficos, como crear un NPC (Personaje No Jugador) para un juego.<\/li>\n\n\n\n<li><strong>Explora Otras Tareas de IA:<\/strong> Prueba a implementar modelos de visi\u00f3n por computadora o reconocimiento de voz usando Transformers.js. Busca modelos del autor de la biblioteca en Hugging Face para opciones compatibles.<\/li>\n\n\n\n<li><strong>Mejoras en la UI:<\/strong> Mejora la interfaz de chat con caracter\u00edsticas como historial de mensajes, perfiles de usuario o personalizaci\u00f3n de temas.<\/li>\n\n\n\n<li><strong>Manejo de Errores y Robustez:<\/strong> Implementa un mejor manejo de errores para fallos en la carga del modelo o problemas de red.<\/li>\n<\/ul>\n\n\n\n<p>Recuerda que el campo de la IA y el procesamiento de lenguaje natural est\u00e1 evolucionando r\u00e1pidamente. Sigue experimentando, aprendiendo y manteni\u00e9ndote actualizado con los \u00faltimos desarrollos en modelos de transformadores y aplicaciones de IA basadas en el navegador.<\/p>\n\n\n\n<p>Esperamos que hayas disfrutado de este tutorial y que lo encuentres valioso para entender c\u00f3mo crear chatbots impulsados por IA directamente en el navegador. \u00a1Feliz codificaci\u00f3n!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u00a1Descubramos c\u00f3mo podemos crear una conversaci\u00f3n aut\u00e9ntica con un asistente virtual basado en un modelo de IA similar a ChatGPT, sin tener que comunicarnos con un servidor, sino completamente dentro del navegador! \u00bfEs realmente posible hacer esto sin costo alguno completamente del lado del cliente con JavaScript? \u00bfRealmente llegaremos a algo &#8220;similar a ChatGPT&#8221;? \u00bfNos&#8230; <a class=\"more-link\" href=\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/\">Read more<\/a><\/p>\n","protected":false},"author":255,"featured_media":27691,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_editorskit_title_hidden":false,"_editorskit_reading_time":0,"_editorskit_is_block_options_detached":false,"_editorskit_block_options_position":"{}","_uag_custom_page_level_css":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[10598],"tags":[10664],"collections":[],"class_list":{"0":"post-29833","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-inteligencia-artificial","8":"tag-ia","9":"entry"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v26.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador<\/title>\n<meta name=\"description\" content=\"\u00a1Vamos a crear un aut\u00e9ntico asistente digital (chatbot basado en IA) utilizando un modelo similar a ChatGPT! \u00a1No te pierdas esta gu\u00eda!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador\" \/>\n<meta property=\"og:description\" content=\"\u00a1Vamos a crear un aut\u00e9ntico asistente digital (chatbot basado en IA) utilizando un modelo similar a ChatGPT! \u00a1No te pierdas esta gu\u00eda!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/\" \/>\n<meta property=\"og:site_name\" content=\"Codemotion Magazine\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Codemotion.Italy\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-09-26T11:39:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-26T12:14:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"768\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Massimo Avvisati\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@MassimoAvvisati\" \/>\n<meta name=\"twitter:site\" content=\"@CodemotionIT\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Massimo Avvisati\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/\"},\"author\":{\"name\":\"Massimo Avvisati\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/7d033c17576f9bdfec9dab783e58976a\"},\"headline\":\"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador\",\"datePublished\":\"2024-09-26T11:39:40+00:00\",\"dateModified\":\"2024-09-26T12:14:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/\"},\"wordCount\":1256,\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png\",\"keywords\":[\"IA\"],\"articleSection\":[\"Inteligencia Artificial\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/\",\"name\":\"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador\",\"isPartOf\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png\",\"datePublished\":\"2024-09-26T11:39:40+00:00\",\"dateModified\":\"2024-09-26T12:14:00+00:00\",\"description\":\"\u00a1Vamos a crear un aut\u00e9ntico asistente digital (chatbot basado en IA) utilizando un modelo similar a ChatGPT! \u00a1No te pierdas esta gu\u00eda!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#primaryimage\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png\",\"width\":1024,\"height\":768,\"caption\":\"chatbon assistente virtuale AI sul browser.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Inteligencia Artificial\",\"item\":\"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#website\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"name\":\"Codemotion Magazine\",\"description\":\"We code the future. Together\",\"publisher\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#organization\",\"name\":\"Codemotion\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png\",\"width\":225,\"height\":225,\"caption\":\"Codemotion\"},\"image\":{\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Codemotion.Italy\/\",\"https:\/\/x.com\/CodemotionIT\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/7d033c17576f9bdfec9dab783e58976a\",\"name\":\"Massimo Avvisati\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/04\/massimo-100x100.jpeg\",\"contentUrl\":\"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/04\/massimo-100x100.jpeg\",\"caption\":\"Massimo Avvisati\"},\"description\":\"I am a full-stack developer, digital artist, maker, and educator with a passion for Artificial Intelligence. I create immersive installations and develop educational software, pushing the boundaries of technology. I believe in Free Software and Creative Commons licensing as a foundation for knowledge sharing. My goal is to craft unique and engaging educational experiences using cutting-edge technology, showcasing the potential of AI in education. Currently, my focus is on Educational Technology, where I strive to create innovative software and hardware tools that engage and inspire learners. I firmly believe in the power of Free Software and Creative Commons, utilizing these open platforms to ensure my work is accessible and reusable by others. I actively reject restrictive platforms that limit creativity and collaboration. By combining my artistic vision with cutting-edge technology, I aim to develop unique educational experiences that spark curiosity and foster a love of learning. Through my work, I strive to demonstrate the incredible potential of AI in education and the arts.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/massimo-avvisati-7220312\/\",\"https:\/\/x.com\/MassimoAvvisati\"],\"knowsAbout\":[\"Javascript\",\"Node.js\",\"PHP\",\"AI\",\"Machine Learning\",\"Web Development\",\"Free Software\"],\"knowsLanguage\":[\"English\",\"Spanish\",\"Italian\"],\"jobTitle\":\"Head of EdTech R&D\",\"worksFor\":\"Codemotion spa\",\"url\":\"https:\/\/www.codemotion.com\/magazine\/author\/massimo-avvisati\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador","description":"\u00a1Vamos a crear un aut\u00e9ntico asistente digital (chatbot basado en IA) utilizando un modelo similar a ChatGPT! \u00a1No te pierdas esta gu\u00eda!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/","og_locale":"en_US","og_type":"article","og_title":"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador","og_description":"\u00a1Vamos a crear un aut\u00e9ntico asistente digital (chatbot basado en IA) utilizando un modelo similar a ChatGPT! \u00a1No te pierdas esta gu\u00eda!","og_url":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/","og_site_name":"Codemotion Magazine","article_publisher":"https:\/\/www.facebook.com\/Codemotion.Italy\/","article_published_time":"2024-09-26T11:39:40+00:00","article_modified_time":"2024-09-26T12:14:00+00:00","og_image":[{"width":1024,"height":768,"url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png","type":"image\/png"}],"author":"Massimo Avvisati","twitter_card":"summary_large_image","twitter_creator":"@MassimoAvvisati","twitter_site":"@CodemotionIT","twitter_misc":{"Written by":"Massimo Avvisati","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#article","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/"},"author":{"name":"Massimo Avvisati","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/7d033c17576f9bdfec9dab783e58976a"},"headline":"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador","datePublished":"2024-09-26T11:39:40+00:00","dateModified":"2024-09-26T12:14:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/"},"wordCount":1256,"publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png","keywords":["IA"],"articleSection":["Inteligencia Artificial"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/","url":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/","name":"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador","isPartOf":{"@id":"https:\/\/www.codemotion.com\/magazine\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#primaryimage"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#primaryimage"},"thumbnailUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png","datePublished":"2024-09-26T11:39:40+00:00","dateModified":"2024-09-26T12:14:00+00:00","description":"\u00a1Vamos a crear un aut\u00e9ntico asistente digital (chatbot basado en IA) utilizando un modelo similar a ChatGPT! \u00a1No te pierdas esta gu\u00eda!","breadcrumb":{"@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#primaryimage","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png","width":1024,"height":768,"caption":"chatbon assistente virtuale AI sul browser."},{"@type":"BreadcrumbList","@id":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/guia-practica-para-construir-un-chatbot-de-ia-en-el-navegador\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.codemotion.com\/magazine\/"},{"@type":"ListItem","position":2,"name":"Inteligencia Artificial","item":"https:\/\/www.codemotion.com\/magazine\/es\/inteligencia-artificial\/"},{"@type":"ListItem","position":3,"name":"Gu\u00eda pr\u00e1ctica para construir un Chatbot de IA en el navegador"}]},{"@type":"WebSite","@id":"https:\/\/www.codemotion.com\/magazine\/#website","url":"https:\/\/www.codemotion.com\/magazine\/","name":"Codemotion Magazine","description":"We code the future. Together","publisher":{"@id":"https:\/\/www.codemotion.com\/magazine\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.codemotion.com\/magazine\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.codemotion.com\/magazine\/#organization","name":"Codemotion","url":"https:\/\/www.codemotion.com\/magazine\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2019\/11\/codemotionlogo.png","width":225,"height":225,"caption":"Codemotion"},"image":{"@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Codemotion.Italy\/","https:\/\/x.com\/CodemotionIT"]},{"@type":"Person","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/7d033c17576f9bdfec9dab783e58976a","name":"Massimo Avvisati","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.codemotion.com\/magazine\/#\/schema\/person\/image\/","url":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/04\/massimo-100x100.jpeg","contentUrl":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/04\/massimo-100x100.jpeg","caption":"Massimo Avvisati"},"description":"I am a full-stack developer, digital artist, maker, and educator with a passion for Artificial Intelligence. I create immersive installations and develop educational software, pushing the boundaries of technology. I believe in Free Software and Creative Commons licensing as a foundation for knowledge sharing. My goal is to craft unique and engaging educational experiences using cutting-edge technology, showcasing the potential of AI in education. Currently, my focus is on Educational Technology, where I strive to create innovative software and hardware tools that engage and inspire learners. I firmly believe in the power of Free Software and Creative Commons, utilizing these open platforms to ensure my work is accessible and reusable by others. I actively reject restrictive platforms that limit creativity and collaboration. By combining my artistic vision with cutting-edge technology, I aim to develop unique educational experiences that spark curiosity and foster a love of learning. Through my work, I strive to demonstrate the incredible potential of AI in education and the arts.","sameAs":["https:\/\/www.linkedin.com\/in\/massimo-avvisati-7220312\/","https:\/\/x.com\/MassimoAvvisati"],"knowsAbout":["Javascript","Node.js","PHP","AI","Machine Learning","Web Development","Free Software"],"knowsLanguage":["English","Spanish","Italian"],"jobTitle":"Head of EdTech R&D","worksFor":"Codemotion spa","url":"https:\/\/www.codemotion.com\/magazine\/author\/massimo-avvisati\/"}]}},"featured_image_src":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-600x400.png","featured_image_src_square":"https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-600x600.png","author_info":{"display_name":"Massimo Avvisati","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/massimo-avvisati\/"},"uagb_featured_image_src":{"full":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png",1024,768,false],"thumbnail":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-150x150.png",150,150,true],"medium":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-300x225.png",300,225,true],"medium_large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-768x576.png",768,576,true],"large":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png",1024,768,false],"1536x1536":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png",1024,768,false],"2048x2048":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e.png",1024,768,false],"small-home-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-100x100.png",100,100,true],"sidebar-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-180x128.png",180,128,true],"genesis-singular-images":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-896x504.png",896,504,true],"archive-featured":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-400x225.png",400,225,true],"gb-block-post-grid-landscape":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-600x400.png",600,400,true],"gb-block-post-grid-square":["https:\/\/www.codemotion.com\/magazine\/wp-content\/uploads\/2024\/05\/cee94f9e-6bc3-420a-aeeb-a61dda06b10e-600x600.png",600,600,true]},"uagb_author_info":{"display_name":"Massimo Avvisati","author_link":"https:\/\/www.codemotion.com\/magazine\/author\/massimo-avvisati\/"},"uagb_comment_info":0,"uagb_excerpt":"\u00a1Descubramos c\u00f3mo podemos crear una conversaci\u00f3n aut\u00e9ntica con un asistente virtual basado en un modelo de IA similar a ChatGPT, sin tener que comunicarnos con un servidor, sino completamente dentro del navegador! \u00bfEs realmente posible hacer esto sin costo alguno completamente del lado del cliente con JavaScript? \u00bfRealmente llegaremos a algo \"similar a ChatGPT\"? \u00bfNos&#8230;&hellip;","lang":"es","_links":{"self":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/29833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/users\/255"}],"replies":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/comments?post=29833"}],"version-history":[{"count":3,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/29833\/revisions"}],"predecessor-version":[{"id":29858,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/posts\/29833\/revisions\/29858"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media\/27691"}],"wp:attachment":[{"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/media?parent=29833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/categories?post=29833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/tags?post=29833"},{"taxonomy":"collections","embeddable":true,"href":"https:\/\/www.codemotion.com\/magazine\/wp-json\/wp\/v2\/collections?post=29833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}