<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Dario Farzati</title>
    <description>The latest articles on Forem by Dario Farzati (@dariofarzati).</description>
    <link>https://forem.com/dariofarzati</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F984917%2F141b0005-ddba-43f2-8686-b6989fdd2040.jpeg</url>
      <title>Forem: Dario Farzati</title>
      <link>https://forem.com/dariofarzati</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dariofarzati"/>
    <language>en</language>
    <item>
      <title>De APIs a ACIs: La Próxima Evolución en la Interacción con el Software</title>
      <dc:creator>Dario Farzati</dc:creator>
      <pubDate>Fri, 13 Sep 2024 09:04:12 +0000</pubDate>
      <link>https://forem.com/dariofarzati/de-apis-a-acis-la-proxima-evolucion-en-la-interaccion-con-el-software-4po4</link>
      <guid>https://forem.com/dariofarzati/de-apis-a-acis-la-proxima-evolucion-en-la-interaccion-con-el-software-4po4</guid>
      <description>&lt;h2&gt;
  
  
  Introducción
&lt;/h2&gt;

&lt;p&gt;En el panorama en constante evolución del desarrollo de software, hemos visto cambios significativos en cómo las aplicaciones se comunican e interactúan. Desde los primeros días de las arquitecturas monolíticas hasta el auge de los microservicios, cada evolución tenía como objetivo hacer el software más eficiente y fácil de usar. Sin embargo, a medida que la tecnología avanza, también lo hace la complejidad de las interacciones.&lt;/p&gt;

&lt;p&gt;Aquí es donde entran en juego las &lt;strong&gt;Interfaces Conversacionales de Aplicación (ACIs)&lt;/strong&gt;, y me gustaría compartir algunos pensamientos sobre un nuevo paradigma que podría reducir la carga cognitiva y hacer que la interacción con el software sea más intuitiva que nunca.&lt;/p&gt;

&lt;p&gt;Los Large Language Models están transformando la forma en que interactuamos con la tecnología. Estamos entrando en una era donde comunicarse con las máquinas es tan natural como conversar con un colega. Los usuarios ahora pueden expresar sus necesidades en lenguaje cotidiano, y los sistemas responden en consecuencia. Y esta es la base de las ACIs.&lt;/p&gt;

&lt;p&gt;Esta propuesta no es solo una actualización tecnológica, es un cambio de paradigma que también plantea preguntas profundas: ¿cómo remodelará esto la experiencia para usuarios, desarrolladores y agentes de IA?&lt;/p&gt;

&lt;h2&gt;
  
  
  La interfaz que se disuelve
&lt;/h2&gt;

&lt;p&gt;En una era donde los LLMs pueden responder con texto, formatos estructurados, imágenes, voz o incluso código que genera interfaces visuales dinámicas, debemos preguntarnos: ¿cuánto tiempo más seguiremos construyendo capas entre nosotros y el software? ¿Qué pasaría si dejáramos de desarrollar &lt;em&gt;user interfaces&lt;/em&gt; y &lt;em&gt;application programming interfaces&lt;/em&gt; tradicionales por completo?&lt;/p&gt;

&lt;p&gt;Hoy en día, todo parece converger en una interfaz de prompt o chat. Aunque no todos los problemas se resolverán por estos medios, esto es solo el comienzo. La clave no es la interfaz en sí, sino lo que representa: un cambio fundamental en cómo interactuamos con la tecnología.&lt;/p&gt;

&lt;p&gt;Por ejemplo, integrar una API relativamente compleja requiere navegar por una extensa documentación, entender esquemas, respuestas, excepciones; esto no solo consume tiempo valioso, sino que también desvía el enfoque de la construcción de características principales.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsp7a16f32nkis9hq9lf6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsp7a16f32nkis9hq9lf6.png" alt="Especificación de la API de Stripe" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ahora, imagina eludir estas complejidades a través de una interfaz que entiende tu intención mediante lenguaje natural. Aquí es donde podemos ver que la era de las UIs y APIs podría estar evolucionando hacia un nuevo paradigma: las ACIs.&lt;/p&gt;

&lt;p&gt;Antes de profundizar en el qué, cómo y por qué de las ACIs, revisemos brevemente el viaje que nos ha llevado a este momento crucial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Todo es una API
&lt;/h2&gt;

&lt;p&gt;Tracemos la evolución de las APIs para entender por qué fueron inventadas. Inicialmente, cuando teníamos sistemas con algoritmos y estructuras de datos específicos resolviendo problemas en ciertos dominios, era eficiente encapsularlos y exponerlos a través de interfaces - Interfaces de Programación de Aplicaciones (APIs). Para evitar confusiones más adelante, llamemos a estas APIs específicas "APIs de Dominio". Luego, encima de eso, agregamos otra interfaz, una Interfaz de Usuario, que capturaría las intenciones del usuario y las traduciría en llamadas API correspondientes.&lt;/p&gt;

&lt;p&gt;En esencia, implementamos una interfaz (UI) para interactuar con otra interfaz (API de Dominio).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9fyzxlrsl22ie31ewxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9fyzxlrsl22ie31ewxq.png" alt="UI interactuando con una API" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Eventualmente, también necesitamos interactuar con programas que se ejecutan en lugares remotos en todo Internet, por lo que nuestras interfaces o incluso nuestros sistemas backend interactuarían con estas interfaces remotas. Y así nuestro viaje de construcción de interfaces nos llevó a donde estamos hoy:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5v6heut560qkgj3p10hp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5v6heut560qkgj3p10hp.png" alt="UI y sistema remoto interactuando con API" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Entonces, todo es una I(nterfaz)... ¿y?
&lt;/h2&gt;

&lt;p&gt;Bueno, no solo todo es una interfaz, sino que cada una opera en un nivel de abstracción diferente, escrita en varios lenguajes, por diversos autores que toman decisiones de diseño distintas (y no siempre coherentes) que responden a casos de uso únicos.&lt;/p&gt;

&lt;p&gt;Como desarrolladores, al navegar por toda esta interfaz, pasamos un tiempo considerable moviéndonos a través de las diferentes capas de un sistema y sus dependencias. Esencialmente, estamos traduciendo datos de una interfaz a otra, todo mientras intentamos mantener la vista en nuestra intención original. En muchos casos, implementar correctamente estas interfaces es más desafiante y tedioso que escribir la lógica de dominio real que resuelve el problema!&lt;/p&gt;

&lt;p&gt;Una parte sustancial de este esfuerzo se dedica principalmente a los &lt;strong&gt;pasos 2 y 3&lt;/strong&gt; a continuación:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Los desarrolladores implementan sistemas backend.&lt;/li&gt;
&lt;li&gt;Los desarrolladores exponen interfaces de programación en esos sistemas backend.&lt;/li&gt;
&lt;li&gt;Los desarrolladores consumen interfaces de programación para construir sistemas backend y/o interfaces de usuario.&lt;/li&gt;
&lt;li&gt;Los usuarios finales interactúan con interfaces de usuario para lograr sus tareas.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Esta complejidad a menudo oscurece nuestro objetivo principal: resolver eficientemente el problema del usuario.&lt;/p&gt;

&lt;h2&gt;
  
  
  El Amanecer de las Interfaces Generadas Dinámicamente
&lt;/h2&gt;

&lt;p&gt;En los últimos, ¿qué, 16 meses?, hemos observado un avance: aplicaciones LLM como ChatGPT han comenzado a usar acciones que consumen APIs y devuelven datos en múltiples formatos, incluyendo JSON estructurado y código HTML, CSS y JavaScript.&lt;/p&gt;

&lt;p&gt;Vemos de nuevo una interfaz de usuario, en este caso, en forma de prompt o chat. Esta es una UI que, como cualquier otra UI, está escrita &lt;em&gt;de antemano&lt;/em&gt; por un grupo de ingenieros. Pero esta tiene una característica especial: esta interfaz de prompt &lt;em&gt;genera nuevas interfaces sobre la marcha&lt;/em&gt;, particularmente UIs (pero no limitado a ellas, como veremos más adelante).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55xmgpr3yb4s06qmuajw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55xmgpr3yb4s06qmuajw.png" alt="Interfaz conversacional generando una interfaz de usuario" width="800" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Hoy puedes pedirle a modelos como Sonnet o ChatGPT que creen interfaces interactivas con entradas y salidas, visualizaciones de gráficos, SVGs, lo que quieras. Combinado con acciones que permiten al modelo conectarse con APIs, esto proporciona al usuario una interfaz de usuario inmediata, bajo demanda y ad-hoc para abordar cualquier tarea particular.&lt;/p&gt;

&lt;p&gt;Pero eso no es todo. Con capacidades más potentes de Tool Calling y Structured Output, estas interfaces no solo pueden generar UIs sino también APIs. Devuelven datos en cualquier formato y esquema que especifiques.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiw04btcyf2o0zp2gxfrv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiw04btcyf2o0zp2gxfrv.png" alt="Interfaces conversacionales generando APIs" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Y esto es solo el comienzo.&lt;/p&gt;

&lt;p&gt;Las capas que se sientan entre el usuario final y los algoritmos reales que resuelven las necesidades del usuario —las interfaces intermediarias diseñadas para traducir la intención del usuario en llamadas API programáticas— se están volviendo redundantes.&lt;/p&gt;

&lt;p&gt;Claro, la mayoría de los humanos son visuales; y las personas visuales todavía quieren dashboards, paneles y botones. Pero el punto no es reemplazar las UIs con Prompts; el punto es en &lt;em&gt;qué&lt;/em&gt; se convertirán realmente estas UIs de ahora en adelante, &lt;em&gt;quién&lt;/em&gt; tendrá que implementarlas, &lt;em&gt;cuándo&lt;/em&gt; y &lt;em&gt;cómo&lt;/em&gt;?&lt;br&gt;
¿Es realmente necesario construir una UI lo suficientemente común para atender al usuario promedio? ¿Intentar anticipar casos de uso? ¿Agregar localización para múltiples idiomas? ¿Garantizar la accesibilidad? ¿Siempre limitarse a una interfaz visual?&lt;/p&gt;

&lt;p&gt;Todas estas tareas podrían abordarse dinámicamente de una manera que se ajuste mejor a &lt;strong&gt;Cada&lt;/strong&gt;. &lt;strong&gt;Único&lt;/strong&gt;. &lt;strong&gt;Usuario&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Estos usuarios pueden recibir exactamente la interfaz que necesitan, mostrando la información precisa que requieren, en un formato que coincida con sus preferencias y necesidades de accesibilidad: visual, audio o texto.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8jc7ofredaqyh8k7fd79.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8jc7ofredaqyh8k7fd79.png" alt="Interfaz multimodal" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Hacia una Interfaz Única
&lt;/h2&gt;

&lt;p&gt;Con estas capas colapsando y las interfaces siendo generadas dinámicamente sobre la marcha, podemos visualizar una única interfaz que sirva para todos los propósitos:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sirve a los desarrolladores que buscan integrar funcionalidad en sus aplicaciones.&lt;/li&gt;
&lt;li&gt;Sirve a los usuarios finales que buscan interactuar directamente con el sistema.&lt;/li&gt;
&lt;li&gt;Sirve a los agentes de IA que realizan tareas o buscan información de forma autónoma.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Llamaría a esta interfaz única una Interfaz Conversacional de Aplicación (ACI).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2yl5fb03mzj6wqjo6xsu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2yl5fb03mzj6wqjo6xsu.png" alt="ACI: La Interfaz Única" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Aunque su impacto puede ser remotamente comparable a cómo GraphQL cambió las interacciones de API en comparación con REST, las ACIs van mucho más allá al proponer un paradigma completamente nuevo.&lt;/p&gt;

&lt;p&gt;Podemos esbozar varias diferencias radicales en comparación con las APIs tradicionales:&lt;/p&gt;
&lt;h3&gt;
  
  
  Interacción basada en intención
&lt;/h3&gt;

&lt;p&gt;Las ACIs no tienen contratos fijos o preestablecidos, esquemas, métodos o flujos de trabajo precisos. Son &lt;strong&gt;&lt;em&gt;basadas en intención&lt;/em&gt;&lt;/strong&gt; en lugar de &lt;strong&gt;&lt;em&gt;basadas en llamadas procedurales&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;En lugar de llamar a métodos específicos con parámetros predefinidos, los desarrolladores y usuarios pueden expresar sus intenciones en lenguaje natural. Por ejemplo, "&lt;em&gt;Crear una nueva cuenta de usuario con privilegios de administrador&lt;/em&gt;" es más intuitivo que construir una o dos llamadas API con el endpoint y los parámetros correctos.&lt;/p&gt;

&lt;p&gt;Dado que las ACIs no están limitadas por contratos rígidos, pueden entender y adaptarse a nuevas solicitudes sin requerir actualizaciones explícitas o cambios de versión. Esta flexibilidad reduce la sobrecarga de mantenimiento y acelera los ciclos de desarrollo.&lt;/p&gt;

&lt;p&gt;Solo imagina cómo construirías un endpoint de API para convertir nombres en codificación base64, que responda a diversas necesidades del consumidor:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Llamada simple, podría ser hecha por un cliente ACI o incluso por el usuario final&lt;/span&gt;
curl localhost &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"¿Cómo se ve mi nombre en base64? Es John"&lt;/span&gt;
Tu nombre &lt;span class="s2"&gt;"John"&lt;/span&gt; en &lt;span class="nb"&gt;base64 &lt;/span&gt;es: &lt;span class="nv"&gt;Sm9obg&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;

&lt;span class="c"&gt;# Llamada con una respuesta estructurada que puede ser usada por un cliente ACI&lt;/span&gt;
curl localhost &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"Escribe un documento JSON con &lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;code: &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;base64 &lt;/span&gt;de &lt;span class="s1"&gt;'OpenACI'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"code"&lt;/span&gt;:&lt;span class="s2"&gt;"T3BlbkFDSQ=="&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Llamada con un cuerpo de solicitud JSON y una respuesta JSON&lt;/span&gt;
&lt;span class="c"&gt;# – no diferente a una API JSON normal (¡podría incluso&lt;/span&gt;
&lt;span class="c"&gt;# ser usada durante una fase de transición de API a ACI!)&lt;/span&gt;
curl localhost &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"intent":"convertToBase64","name":"OpenACI"}'&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;:&lt;span class="s2"&gt;"OpenACI"&lt;/span&gt;,&lt;span class="s2"&gt;"base64"&lt;/span&gt;:&lt;span class="s2"&gt;"T3BlbkFDSQ=="&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Llamada con múltiples parámetros (ACI llama al manejador&lt;/span&gt;
&lt;span class="c"&gt;# de intención múltiples veces - ¡no hay necesidad de cambiar&lt;/span&gt;
&lt;span class="c"&gt;# la implementación!)&lt;/span&gt;
curl localhost &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"Muéstrame una tabla ascii con la representación en base64 de estos nombres: John Connor, Sarah Connor, Kyle Reese"&lt;/span&gt;
| Nombre        | Base64                |
|---------------|-----------------------|
| John Connor   | &lt;span class="nv"&gt;Sm9obiBDb25ub3I&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;      |
| Sarah Connor  | U2FyYWggQ29ubm9y      |
| Kyle Reese    | &lt;span class="nv"&gt;S3lsZSBSZWVzZQ&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;      |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Ahora compara la API que imaginaste, con la implementación ACI que realmente respondió a las solicitudes ilustradas arriba:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;HttpAci&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@openaci/http&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;HttpAci&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;llmName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o-mini&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;schema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Convert name to base64&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;entities&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;entities&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Diseño centrado en el humano
&lt;/h3&gt;

&lt;p&gt;Estas interfaces posicionan a los humanos como los principales consumidores, apoyándolos en cualquier rol, ya sea como usuarios finales o desarrolladores. Esto es crucial: las ACIs sirven a ambos a través del mismo marco conversacional. Esta unificación simplifica la arquitectura y reduce la necesidad de interfaces separadas como UIs o APIs especializadas.&lt;/p&gt;

&lt;p&gt;Para los desarrolladores, como se dijo anteriormente, podemos integrar rápidamente funcionalidades sin gastar tiempo aprendiendo una nueva API. Simplemente podemos escribir código cliente que establezca lo que queremos lograr, y la ACI interpreta y ejecuta la intención.&lt;/p&gt;

&lt;p&gt;Para los usuarios finales, pueden personalizar su interacción con el sistema sobre la marcha. Por ejemplo, un usuario podría pedir, ya sea por chat o voz, "Muéstrame todos los documentos que creé ayer" sin navegar a través de múltiples pantallas de UI. Las aplicaciones aún podrían ofrecer una UI visual predeterminada, pero los usuarios podrían aprovechar las ACIs para personalizar y adaptar la interfaz a sus necesidades y preferencias, al detalle.&lt;/p&gt;
&lt;h3&gt;
  
  
  Accesibilidad y conveniencia
&lt;/h3&gt;

&lt;p&gt;Teniendo en cuenta el punto anterior, la accesibilidad es un aspecto fundamental de las ACIs. No solo por inclusividad, sino también por conveniencia. Las ACIs son multilenguaje y multimodales. Al soportar múltiples idiomas y modalidades (texto, voz, visuales), las ACIs hacen que los sistemas sean más accesibles para una diverse gama de usuarios, incluidos aquellos con discapacidades.&lt;/p&gt;
&lt;h3&gt;
  
  
  Más allá de la interacción humana
&lt;/h3&gt;

&lt;p&gt;A medida que los LLMs continúan evolucionando y los agentes de IA se vuelven más sofisticados, también se convierten en consumidores de ACIs. En este sentido, un consumidor no es solo humano, sino cualquiera capaz de interactuar con estas interfaces usando lenguaje natural. Esto abre posibilidades para sistemas multi-agente distribuidos que pueden colaborar y negociar usando lenguaje natural, aunque lo que probablemente sucederá es que los agentes de IA aprovecharán la flexibilidad de las ACIs para acordar el mejor formato de datos e intercambiarán mensajes de la manera más optimizada sin nuestra intervención.&lt;/p&gt;
&lt;h2&gt;
  
  
  El Camino por Delante
&lt;/h2&gt;

&lt;p&gt;Las ACIs representan un enfoque transformador para la interacción con el software, alineando la tecnología más estrechamente con los patrones de comunicación humana. Tienen el potencial de reducir la sobrecarga de desarrollo al eliminar la necesidad de múltiples capas intermediarias; definitivamente empoderarán a los usuarios, quienes ganarán acceso directo y personalizado a las capacidades del sistema sin depender de que alguien más piense en una interfaz que podría no satisfacer todas las necesidades o preferencias del usuario. Las ACIs también fomentarán la innovación, ya que con menos barreras para la integración, nuevos servicios y colaboraciones pueden surgir más rápidamente.&lt;/p&gt;

&lt;p&gt;Ahora bien, todavía hay un camino por recorrer. Aunque creo que las ACIs podrían implementarse hoy para algunos casos de uso, la realidad es que el rendimiento, incluso para los modelos más rápidos, y las economías de escala, aún tienen que inclinarse a favor de una adopción generalizada para aplicaciones de alto tráfico. Todavía no estamos en una etapa donde podríamos reemplazar una API que recibe cientos de solicitudes por segundo. La estructura de costos actual sigue siendo prohibitiva para muchos casos de uso.&lt;/p&gt;

&lt;p&gt;Pero por supuesto, esto es solo cuestión de tiempo. Hemos visto el impresionante avance en los últimos 12 meses. Creo que el cambio de APIs a ACIs ya nos permite reimaginar cómo interactuamos con el software.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusión
&lt;/h2&gt;

&lt;p&gt;Las Interfaces Conversacionales de Aplicación podrían ser un cambio transformador en cómo interactuamos con el software. Al disolver las capas tradicionales entre usuarios y aplicaciones, las ACIs prometen un futuro donde la interacción es más intuitiva, personalizada y accesible que nunca. No veo esto solo como una mejora incremental, es una reimaginación fundamental de nuestra relación con la tecnología.&lt;/p&gt;

&lt;p&gt;Sin embargo, como con cualquier cambio de paradigma, las ACIs plantean preguntas y desafíos que creo que nosotros, como comunidad, necesitamos abordar:&lt;/p&gt;

&lt;p&gt;¿Cómo remodelarán las ACIs los roles de desarrolladores y diseñadores? Con interfaces siendo generadas dinámicamente, ¿qué nuevas habilidades necesitarán cultivar los profesionales?&lt;/p&gt;

&lt;p&gt;¿Cuáles son las implicaciones para la privacidad y seguridad del usuario en un mundo dominado por interacciones basadas en intención? ¿Cómo aseguramos que la conveniencia de las ACIs no comprometa la protección de datos?&lt;/p&gt;

&lt;p&gt;¿Cómo podemos superar las barreras actuales de rendimiento y costo para hacer que las ACIs sean viables para aplicaciones de alto tráfico? ¿Qué innovaciones se necesitan en hardware o software para apoyar este cambio?&lt;/p&gt;

&lt;p&gt;Estas preguntas no son solo técnicas, tocan dimensiones éticas, sociales y económicas que darán forma al futuro de nuestro mundo digital.&lt;/p&gt;
&lt;h2&gt;
  
  
  Únete a la conversación
&lt;/h2&gt;

&lt;p&gt;El viaje hacia la plena realización del potencial de las ACIs está apenas comenzando, e invita a la colaboración y al diálogo. Tus ideas, experiencias y pensamientos son invaluables para navegar este nuevo panorama.&lt;/p&gt;
&lt;h3&gt;
  
  
  La especificación OpenACI
&lt;/h3&gt;

&lt;p&gt;Con este paradigma en mente, queremos proponer una especificación abierta para Interfaces Conversacionales de Aplicación. Se llama OpenACI y su primer borrador será publicado la próxima semana.&lt;/p&gt;

&lt;p&gt;Mientras tanto, puedes jugar con un prototipo muy temprano (y simplista) de una &lt;a href="https://github.com/openaci/http-node" rel="noopener noreferrer"&gt;implementación HTTP OpenACI en nuestro repositorio de GitHub&lt;/a&gt;:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/openaci" rel="noopener noreferrer"&gt;
        openaci
      &lt;/a&gt; / &lt;a href="https://github.com/openaci/http-node" rel="noopener noreferrer"&gt;
        http-node
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      OpenACI Node implementation 
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;strong&gt;Application Conversational Interfaces&lt;/strong&gt; (ACIs) introduce a new paradigm, in a way comparable to what GraphQL was for RPC or RESTful APIs, but in this case proposing something entirely different to replace the term “API”.&lt;/p&gt;
&lt;p&gt;We can enumerate a few radically different points when compared to APIs:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;ACIs don't have a fixed or pre-established contract, schema, methods or a precise workflow. They are &lt;strong&gt;intent-based&lt;/strong&gt; rather than &lt;strong&gt;procedural call-based&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;These interfaces put humans as the main consumer, &lt;strong&gt;without making a distinction&lt;/strong&gt; whether they are &lt;strong&gt;end-users&lt;/strong&gt; or &lt;strong&gt;developers&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With the previous point in mind, &lt;strong&gt;accessibility&lt;/strong&gt; is an important aspect of ACIs. Not only for inclusivity but also for convenience. ACIs are &lt;strong&gt;multi-language&lt;/strong&gt; and &lt;strong&gt;multi-modal&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As LLMs continue evolving and AI agents perform better at reasoning, they will also qualify as consumers of ACIs. In this sense, we can iterate over the concept and think of a consumer as anybody capable…&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/openaci/http-node" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;¡Esperamos tus comentarios! Si quieres unirte para discutir y definir la especificación OpenACI, escríbeme a &lt;a href="mailto:lfarzati@gmail.com"&gt;lfarzati@gmail.com&lt;/a&gt; or &lt;a href="https://linkedin.com/in/luisfarzati" rel="noopener noreferrer"&gt;contáctame por LinkedIn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;[Anthropic Claude 3.5 Sonnet fue utilizado para revisar, corregir y mejorar la legibilidad de algunas secciones de este artículo, así como su traducción al Español]&lt;/p&gt;

</description>
      <category>llm</category>
      <category>api</category>
      <category>ui</category>
      <category>ai</category>
    </item>
    <item>
      <title>From APIs to ACIs: The Next Evolution in Software Interaction</title>
      <dc:creator>Dario Farzati</dc:creator>
      <pubDate>Thu, 12 Sep 2024 23:34:01 +0000</pubDate>
      <link>https://forem.com/dariofarzati/from-apis-to-acis-the-next-evolution-in-software-interaction-4d39</link>
      <guid>https://forem.com/dariofarzati/from-apis-to-acis-the-next-evolution-in-software-interaction-4d39</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In the ever-evolving landscape of software development, we've seen significant shifts in how applications communicate and interact. From the early days of monolithic architectures to the rise of microservices, each evolution aimed to make software more efficient and user-friendly. Yet, as technology advances, so does the complexity of interactions. &lt;/p&gt;

&lt;p&gt;This is where &lt;strong&gt;Application Conversational Interfaces (ACIs)&lt;/strong&gt; come into play, and I'd like to share some thoughts of a new paradigm that could reduce cognitive load and make software interaction more intuitive than ever before.&lt;/p&gt;

&lt;p&gt;Large Language Models are transforming how we interact with technology. We're entering an era where communicating with machines is as natural as conversing with a colleague. Users can now express their needs in everyday language, and systems respond accordingly. And this is the foundation of ACIs. &lt;/p&gt;

&lt;p&gt;This proposal is not just a technology upgrade – it's a paradigm shift that also raises profound questions: how will this reshape the experience for users, developers and AI agents?&lt;/p&gt;

&lt;h2&gt;
  
  
  The dissolving interface
&lt;/h2&gt;

&lt;p&gt;In an era where LLMs can respond with text, structured formats, images, voice, or even code generating dynamic visual interfaces, we must ask ourselves: how much longer will we continue building layers between us and the software? What if we stop developing traditional &lt;em&gt;user interfaces&lt;/em&gt; and &lt;em&gt;application programming interfaces&lt;/em&gt; altogether?&lt;/p&gt;

&lt;p&gt;Today, everything seems to be converging into a prompt or chat interface. While not all problems will be solved through such means, this is merely the beginning. The key isn't the interface itself but what it represents—a fundamental shift in how we interact with technology.&lt;/p&gt;

&lt;p&gt;For example, integrating a relatively complex API requires navigating extensive documentation, understanding schemas, responses, exceptions; this not only consumes valuable time but also diverts focus from building core features.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsp7a16f32nkis9hq9lf6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsp7a16f32nkis9hq9lf6.png" alt="Stripe API spec" width="800" height="442"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, imagine bypassing these complexities through an interface that understands your intent via natural language. This is where we can see that the era of UIs and APIs could be evolving into a new paradigm: ACIs.&lt;/p&gt;

&lt;p&gt;Before we delve into the what, how, and why of ACIs, let's briefly revisit the journey that has led us to this pivotal moment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Everything is an API
&lt;/h2&gt;

&lt;p&gt;Let's trace the evolution of APIs to understand why they were invented. Initially, when we had systems with specific algorithms and data structures solving problems in certain domains, it was efficient to encapsulate and expose them through interfaces — Application Programming Interfaces (APIs). To avoid confusion later, let's call these specific APIs "Domain APIs." Then, on top of that, we added another interface, a User Interface, that would capture user intentions and translate them into corresponding API calls.&lt;/p&gt;

&lt;p&gt;In essence, we implemented an interface (UI) to interact with another interface (Domain API).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9fyzxlrsl22ie31ewxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9fyzxlrsl22ie31ewxq.png" alt="UI interacting with an API" width="800" height="398"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Eventually, we also needed to interface with programs running in remote places all over the Internet, thus our interfaces or even our backend systems would interact with these remote interfaces. And so our interface-building journey led us to where we are today:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5v6heut560qkgj3p10hp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5v6heut560qkgj3p10hp.png" alt="UI and remote system interacting with API" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  So, everything is an I(nterface)... and?
&lt;/h2&gt;

&lt;p&gt;Well not only is everything an interface, the thing is each operates at a different abstraction level, written in various languages, by diverse authors making distinct (and not always coherent) design choices that respond to unique use cases.&lt;/p&gt;

&lt;p&gt;As developers, when navigating all this interfacing, we spend considerable time moving through the different layers of a system and its dependencies. We're essentially translating data from one interface to another, all while trying to keep sight of our original intent. In many cases, implementing these interfaces correctly is more challenging and tedious than writing the actual domain logic that solves the problem! &lt;/p&gt;

&lt;p&gt;A substantial part of this effort is primarily spent on &lt;strong&gt;steps 2 and 3&lt;/strong&gt; below:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Developers implement backend systems.&lt;/li&gt;
&lt;li&gt;Developers expose programming interfaces in those backend systems.&lt;/li&gt;
&lt;li&gt;Developers consume programming interfaces to build backend systems and/or user interfaces.&lt;/li&gt;
&lt;li&gt;End-users interact with user interfaces to accomplish their tasks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This complexity often obscures our primary goal: efficiently solving the user's problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Dawn of Dynamically Generated Interfaces
&lt;/h2&gt;

&lt;p&gt;In the past, what, 16 months?, we've observed a breakthrough: LLM applications like ChatGPT have started using actions that consume APIs and return data in multiple formats, including structured JSON and HTML, CSS, and JavaScript code.&lt;/p&gt;

&lt;p&gt;We see again a user interface, in this case, in the form of a prompt or chat. This is a UI that, as any other UIs, is written &lt;em&gt;beforehand&lt;/em&gt; by a group of engineers. But this one has a special characteristic: this prompt interface &lt;em&gt;generates new interfaces on the fly&lt;/em&gt;, particularly UIs (but not limited to, as we'll see below).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55xmgpr3yb4s06qmuajw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F55xmgpr3yb4s06qmuajw.png" alt="Conversational interface generating a user interface" width="800" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today you can ask models like Sonnet or ChatGPT to create interactive interfaces with inputs and outputs, chart visualizations, SVGs, you name it. Combined with actions that enable the model to connect with APIs, this provides the user with an immediate, on-demand, ad-hoc user interface for addressing any particular task.&lt;/p&gt;

&lt;p&gt;But, that's not all. With more powerful Tool Calling and Structured Output capabilities, these interfaces not only can generate UIs but also APIs. They return data in whatever format and schema you specify.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiw04btcyf2o0zp2gxfrv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiw04btcyf2o0zp2gxfrv.png" alt="Conversational interfaces generating APIs" width="800" height="508"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And this is just the beginning.&lt;/p&gt;

&lt;p&gt;The layers that sit between the end-user and the actual algorithms solving the user's needs —the intermediary interfaces designed to translate user intent into programmatic API calls— are becoming redundant.&lt;/p&gt;

&lt;p&gt;Sure, most humans are visual; and visual people still want dashboards, panels, and buttons. But the point is not about replacing UIs with Prompts; the point is &lt;em&gt;what&lt;/em&gt; these UIs will really become from now on, &lt;em&gt;who&lt;/em&gt; will have to implement them, &lt;em&gt;when&lt;/em&gt; and &lt;em&gt;how&lt;/em&gt;? &lt;br&gt;
Is it really necessary to build a common enough UI to cater the average user? Trying to anticipate use cases? Adding localization for multiple languages? Ensuring accessibility? Always limiting to a visual interface? &lt;/p&gt;

&lt;p&gt;All these tasks could be dynamically addressed in a way it best fits &lt;strong&gt;Every&lt;/strong&gt;. &lt;strong&gt;Single&lt;/strong&gt;. &lt;strong&gt;User&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These users can receive exactly the interface they need, showing the precise information they require, in a format that matches their preferences and accessibility needs: visual, audio, or text.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8jc7ofredaqyh8k7fd79.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8jc7ofredaqyh8k7fd79.png" alt="Multimodal interface" width="800" height="558"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Towards a Single Interface
&lt;/h2&gt;

&lt;p&gt;With these layers collapsing and interfaces being dynamically generated on the fly, we can envision a single interface serving all purposes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It serves developers looking to integrate functionality into their applications.&lt;/li&gt;
&lt;li&gt;It serves end-users seeking to interact directly with the system.&lt;/li&gt;
&lt;li&gt;It serves AI agents performing tasks or seeking information autonomously.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'd call this single interface an Application Conversational Interface (ACI).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2yl5fb03mzj6wqjo6xsu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2yl5fb03mzj6wqjo6xsu.png" alt="ACI: The Single Interface" width="800" height="560"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;While their impact may be remotely comparable to how GraphQL changed API interactions compared to REST, ACIs go much further by proposing an entirely new paradigm. &lt;/p&gt;

&lt;p&gt;We can outline several radical differences when compared to traditional APIs:&lt;/p&gt;
&lt;h3&gt;
  
  
  Intent-based interaction
&lt;/h3&gt;

&lt;p&gt;ACIs don't have fixed or pre-established contracts, schemas, methods, or precise workflows. They are &lt;strong&gt;&lt;em&gt;intent-based&lt;/em&gt;&lt;/strong&gt; rather than &lt;strong&gt;&lt;em&gt;procedural call-based&lt;/em&gt;&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Instead of calling specific methods with predefined parameters, developers and users can express their intentions in natural language. For example, "&lt;em&gt;Create a new user account with admin privileges&lt;/em&gt;" is more intuitive than constructing one or two API calls with the correct endpoint and parameters.&lt;/p&gt;

&lt;p&gt;Since ACIs are not bound by rigid contracts, they can understand and adapt to new requests without requiring explicit updates or version changes. This flexibility reduces maintenance overhead and accelerates development cycles.&lt;/p&gt;

&lt;p&gt;Just imagine how would you build an API endpoint for converting names into base64 encoding, that responds to diverse consumer needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Simple call, could be made by an ACI client or even by end-user&lt;/span&gt;
curl localhost &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"How does my name look like in base64? It's John"&lt;/span&gt;
Your name &lt;span class="s2"&gt;"John"&lt;/span&gt; &lt;span class="k"&gt;in &lt;/span&gt;&lt;span class="nb"&gt;base64 &lt;/span&gt;is: &lt;span class="nv"&gt;Sm9obg&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;

&lt;span class="c"&gt;# Call with a structured response that can be used by an ACI client&lt;/span&gt;
curl localhost &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"Write a JSON document with &lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;code: &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;base64 &lt;/span&gt;of &lt;span class="s1"&gt;'OpenACI'&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="sb"&gt;`&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"code"&lt;/span&gt;:&lt;span class="s2"&gt;"T3BlbkFDSQ=="&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Call with a JSON request body and a JSON response&lt;/span&gt;
&lt;span class="c"&gt;# – no different to a normal JSON API (could even&lt;/span&gt;
&lt;span class="c"&gt;# be used during an API-to-ACI transition phase!)&lt;/span&gt;
curl localhost &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{"intent":"convertToBase64","name":"OpenACI"}'&lt;/span&gt;
&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;:&lt;span class="s2"&gt;"OpenACI"&lt;/span&gt;,&lt;span class="s2"&gt;"base64"&lt;/span&gt;:&lt;span class="s2"&gt;"T3BlbkFDSQ=="&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="c"&gt;# Call with multiple parameters (ACI calls the intent&lt;/span&gt;
&lt;span class="c"&gt;# handler multiple times - no need to change the&lt;/span&gt;
&lt;span class="c"&gt;# implementation!)&lt;/span&gt;
curl localhost &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"Show me an ascii table with the base64 representation of these names: John Connor, Sarah Connor, Kyle Reese"&lt;/span&gt;
| Name          | Base64                |
|---------------|-----------------------|
| John Connor   | &lt;span class="nv"&gt;Sm9obiBDb25ub3I&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;      |
| Sarah Connor  | U2FyYWggQ29ubm9y      |
| Kyle Reese    | &lt;span class="nv"&gt;S3lsZSBSZWVzZQ&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;      |
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Now compare the API you pictured, with the ACI implementation that actually responded the requests illustrated above:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;HttpAci&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@openaci/http&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;zod&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;HttpAci&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;llmName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o-mini&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;schema&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;intent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Convert name to base64&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;entities&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;entities&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;base64&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Human-centric design
&lt;/h3&gt;

&lt;p&gt;These interfaces position humans as the primary consumers, supporting them in any role — whether as end-users or developers. This is crucial: ACIs serve both of them through the same conversational framework. This unification simplifies the architecture and reduces the need for separate interfaces like UIs or specialized APIs. &lt;/p&gt;

&lt;p&gt;For developers, as said above, we can quickly integrate functionalities without spending time learning a new API. We can simply write client code that states what we want to achieve, and the ACI interprets and executes the intent.&lt;/p&gt;

&lt;p&gt;For end-users, they can customize their interaction with the system on the fly. For instance, a user could ask, either by chat or voice, "Show me all the documents I created yesterday" without navigating through multiple UI screens. Apps could still offer a default visual UI, but users could leverage ACIs to customize and adapt the interface to their needs and preferences, to the detail.&lt;/p&gt;
&lt;h3&gt;
  
  
  Accessibility and convenience
&lt;/h3&gt;

&lt;p&gt;With the previous point in mind, accessibility is a fundamental aspect of ACIs. Not only for inclusivity but also for convenience. ACIs are multi-language and multi-modal. By supporting multiple languages and modalities (text, voice, visuals), ACIs make systems more accessible to a diverse range of users, including those with disabilities.&lt;/p&gt;
&lt;h3&gt;
  
  
  Beyond human interaction
&lt;/h3&gt;

&lt;p&gt;As LLMs continue evolving and AI agents become more sophisticated, they also become consumers of ACIs. In this sense, a consumer isn't only human but anyone capable of interacting with these interfaces using natural language. This opens up possibilities for distributed multi-agent systems that can collaborate and negotiate using natural language, although what will probably happen is that AI agents will leverage the flexibility of ACIs to agree on the best data format and will exchange messages in the most optimized way without our involvement.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Road Ahead
&lt;/h2&gt;

&lt;p&gt;ACIs represent a transformative approach to software interaction, aligning technology more closely with human communication patterns. They have the potential to reduce development overhead by eliminating the need for multiple intermediary layers; they will definitively empower users, who will gain direct and personalized access to system capabilities without depending on someone else thinking an interface that might not fulfill all the user's needs or preferences. ACIs will also foster innovation, since with fewer barriers to integration, new services and collaborations can emerge more rapidly.&lt;/p&gt;

&lt;p&gt;Now, there's still a road ahead. While I believe ACIs could be implemented today for some use cases, reality is that the performance, even for the fastest models, and the economies of scale, have yet to tilt in favor of widespread adoption for high-traffic applications. We are not yet at a stage where we could replace an API that is hit with anything above hundreds of requests per second. The current cost structure remains prohibitive for many use cases.&lt;/p&gt;

&lt;p&gt;But of course this is just a matter of time. We've seen the mind blowing breakthrough in just the past 12 months. I believe the shift from APIs to ACIs already lets us reimagine how we interact with software.&lt;/p&gt;
&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Application Conversational Interfaces could be a transformative shift in how we interact with software. By dissolving the traditional layers between users and applications, ACIs could promise a future where interaction is more intuitive, personalized, and accessible than ever before. I don't see this just as an incremental improvement — it's a fundamental reimagining of our relationship with technology.&lt;/p&gt;

&lt;p&gt;However, as with any paradigm shift, ACIs bring forth questions and challenges that I think we, as a community, need to address:&lt;/p&gt;

&lt;p&gt;How will ACIs reshape the roles of developers and designers? With interfaces being dynamically generated, what new skills will professionals need to cultivate?&lt;/p&gt;

&lt;p&gt;What are the implications for user privacy and security in a world dominated by intent-based interactions? How do we ensure that the convenience of ACIs doesn't compromise data protection?&lt;/p&gt;

&lt;p&gt;How can we overcome the current performance and cost barriers to make ACIs viable for high-traffic applications? What innovations are needed in hardware or software to support this shift?&lt;/p&gt;

&lt;p&gt;These questions are not just technical—they touch on ethical, social, and economic dimensions that will shape the future of our digital world.&lt;/p&gt;
&lt;h2&gt;
  
  
  Join the conversation
&lt;/h2&gt;

&lt;p&gt;The journey towards fully realizing the potential of ACIs is just beginning, and it invites collaboration and dialogue. Your insights, experiences, and ideas are invaluable in navigating this new landscape.&lt;/p&gt;
&lt;h3&gt;
  
  
  The OpenACI specification
&lt;/h3&gt;

&lt;p&gt;With this paradigm in sight, we want to propose an open specification for Application Conversational Interfaces. It's called OpenACI and its first draft will be published next week.&lt;/p&gt;

&lt;p&gt;In the meanwhile, you can play with a very early (and simplistic) prototype of an &lt;a href="https://github.com/openaci/http-node" rel="noopener noreferrer"&gt;HTTP OpenACI implementation in our GitHub repo&lt;/a&gt;:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/openaci" rel="noopener noreferrer"&gt;
        openaci
      &lt;/a&gt; / &lt;a href="https://github.com/openaci/http-node" rel="noopener noreferrer"&gt;
        http-node
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      OpenACI Node implementation 
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;&lt;strong&gt;Application Conversational Interfaces&lt;/strong&gt; (ACIs) introduce a new paradigm, in a way comparable to what GraphQL was for RPC or RESTful APIs, but in this case proposing something entirely different to replace the term “API”.&lt;/p&gt;
&lt;p&gt;We can enumerate a few radically different points when compared to APIs:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;ACIs don't have a fixed or pre-established contract, schema, methods or a precise workflow. They are &lt;strong&gt;intent-based&lt;/strong&gt; rather than &lt;strong&gt;procedural call-based&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;These interfaces put humans as the main consumer, &lt;strong&gt;without making a distinction&lt;/strong&gt; whether they are &lt;strong&gt;end-users&lt;/strong&gt; or &lt;strong&gt;developers&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;With the previous point in mind, &lt;strong&gt;accessibility&lt;/strong&gt; is an important aspect of ACIs. Not only for inclusivity but also for convenience. ACIs are &lt;strong&gt;multi-language&lt;/strong&gt; and &lt;strong&gt;multi-modal&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;As LLMs continue evolving and AI agents perform better at reasoning, they will also qualify as consumers of ACIs. In this sense, we can iterate over the concept and think of a consumer as anybody capable…&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/openaci/http-node" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;Looking forward to your feedback! If you want to join us discussing and defining the OpenACI spec, write me at &lt;a href="mailto:lfarzati@gmail.com"&gt;lfarzati@gmail.com&lt;/a&gt; or &lt;a href="https://linkedin.com/in/luisfarzati" rel="noopener noreferrer"&gt;ping me on LinkedIn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;[Anthropic Claude 3.5 Sonnet was used to review, proofread, and improve the readability of some sections in this article]&lt;/p&gt;

</description>
      <category>api</category>
      <category>ai</category>
      <category>llm</category>
      <category>development</category>
    </item>
    <item>
      <title>How I built an AI-based Telegram bot in 21 minutes with Make and OpenAI</title>
      <dc:creator>Dario Farzati</dc:creator>
      <pubDate>Tue, 06 Dec 2022 17:15:59 +0000</pubDate>
      <link>https://forem.com/dariofarzati/how-i-built-an-ai-based-telegram-bot-in-21-minutes-with-make-and-openai-ebn</link>
      <guid>https://forem.com/dariofarzati/how-i-built-an-ai-based-telegram-bot-in-21-minutes-with-make-and-openai-ebn</guid>
      <description>&lt;p&gt;No, it's not that I'm bragging, it really was &lt;em&gt;that&lt;/em&gt; easy. Let me share the experience and all the details with you. By the end of this post you should be able to build an AI bot for yourself, your friends or your business!&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea
&lt;/h2&gt;

&lt;p&gt;It all started when I wanted to build sort of a &lt;a href="https://github.com/features/copilot" rel="noopener noreferrer"&gt;Copilot AI&lt;/a&gt; but for Telegram. The bot would respond tech questions, explain concepts or even provide answers down to code level of detail. &lt;/p&gt;

&lt;h3&gt;
  
  
  OpenAI
&lt;/h3&gt;

&lt;p&gt;For the AI part I was looking at &lt;a href="https://openai.com" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt; - they have what's called the &lt;a href="https://en.wikipedia.org/wiki/GPT-3" rel="noopener noreferrer"&gt;GPT-3&lt;/a&gt; models, which by their own quote it's&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A set of models that can understand and generate natural language.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can read more about these models in the &lt;a href="https://beta.openai.com/docs/models/overview" rel="noopener noreferrer"&gt;Models page&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;OpenAI's website has a &lt;a href="https://beta.openai.com/playground" rel="noopener noreferrer"&gt;playground&lt;/a&gt; where you can try these models without any code or configuration. The way it works is like this: you provide a text ("prompt"), and the AI will predict (or "complete") the text that would follow. Here's an example:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbaoismfrc8rryv1a95b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffbaoismfrc8rryv1a95b.png" alt="Screenshot of OpenAI's playground website" width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wanted to achieve the same result but via a Telegram chat. The cool thing is that OpenAI provides this functionality via an &lt;a href="https://openai.com/api" rel="noopener noreferrer"&gt;API&lt;/a&gt; that you can integrate in your own apps.&lt;/p&gt;

&lt;p&gt;Ok now I had a picture of the solution: you would simply ask the bot a question on Telegram; this question would then be sent as a prompt to OpenAI's API; and the API response would be sent back to Telegram as a reply.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsde9krrlqaru0zorwur2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsde9krrlqaru0zorwur2.png" alt="The solution diagram" width="800" height="152"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Before you say it: yes, Slack would be a better place for this bot – and I built that as well! But the Telegram version was more fun so I'm going with it for this post&lt;/em&gt; 😄 &lt;/p&gt;

&lt;p&gt;So, I got the idea, I sketched the solution, now I needed to build it! The thing was, I didn't want to spend any time setting up a Node project, installing modules, writing code, deploying it somewhere... maybe it was about time to try these so called "no-code platforms"?&lt;/p&gt;

&lt;h3&gt;
  
  
  "Make" it happen
&lt;/h3&gt;

&lt;p&gt;First of all, don't get the wrong idea - this is not sponsored content (&lt;em&gt;although if Make wants to alleviate my bill for these non-profit, just-for-fun projects, I would be grateful&lt;/em&gt; 😅). &lt;/p&gt;

&lt;p&gt;In fact, I've been totally skeptic about these platforms. My bar is really high for tools that abstract away so much complexity; it's really hard to think the right angles from where to approach this problem and getting the right UX to hide all this complexity while still offering something powerful and flexible that "just works".&lt;/p&gt;

&lt;p&gt;Making my first attempts with a couple of these platforms only reinforced this opinion. They sucked big time. Either they had a complicated, unintuitive, or simply ugly user interface; or they would be slow; or a bunch of other issues that made me frown every time.&lt;/p&gt;

&lt;p&gt;But then just when I was about to give up, a colleague of mine recommended &lt;a href="https://make.com" rel="noopener noreferrer"&gt;Make&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Sure, like any tool, Make is not a silver bullet. But truth is I found it quite powerful for automating tasks or even rapidly setting up backend support for prototyping an idea, maybe even getting an MVP done. &lt;/p&gt;

&lt;p&gt;With a clean, decluttered, simple UI that only progressively expands into details as you consciously want to dig deeper; with a consistent way of doing things that only takes you a few minutes to learn; and with a set of primitives that may not be very diverse yet, but they are really well designed and enough for most typical use cases, I have to say Make passed many of my high demands. 😅 ✅&lt;/p&gt;

&lt;p&gt;So with that out of the way, what else did I need? Ah, of course! The bot!&lt;/p&gt;

&lt;h3&gt;
  
  
  Telegram bots
&lt;/h3&gt;

&lt;p&gt;Creating a &lt;a href="https://core.telegram.org/bots" rel="noopener noreferrer"&gt;Telegram bot&lt;/a&gt; is fun: there's no website, no sign up, no forms — you just use a... bot. Yes, a bot that creates bots. It's called the &lt;a href="https://t.me/BotFather" rel="noopener noreferrer"&gt;BotFather&lt;/a&gt; 😂&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs8i783g0kr2bq6826ofm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs8i783g0kr2bq6826ofm.png" alt="The BotFather account in Telegram" width="688" height="966"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Making sense of everything together
&lt;/h3&gt;

&lt;p&gt;Was I missing something? Let's recap:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The Telegram bot would receive my message, and it would pass it as a prompt to OpenAI's API.&lt;/li&gt;
&lt;li&gt;OpenAI would run my prompt against their GPT-3 model and respond with a completion.&lt;/li&gt;
&lt;li&gt;The bot would use this response as a reply to my message.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Confident and with a plan, I was ready to jump into action! &lt;/p&gt;

&lt;h2&gt;
  
  
  Part I: creating the Telegram bot
&lt;/h2&gt;

&lt;p&gt;I did this with the desktop Telegram client because it was easier to type, copy/paste and so on.&lt;/p&gt;

&lt;p&gt;First thing I did was to look for BotFather:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foylvkbnym4846li8werf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foylvkbnym4846li8werf.png" alt="Searching for BotFather on Telegram" width="752" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After clicking its name and opening the conversation window, BotFather sent me a message enumerating all the available commands. &lt;/p&gt;

&lt;p&gt;I typed &lt;code&gt;/newbot&lt;/code&gt; and answered the couple of questions needed for creating my bot. After that, BotFather gave me a token for using Telegram's Bot API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0tjtsojchoftscuk8cn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy0tjtsojchoftscuk8cn.png" alt="Creating a bot with BotFather" width="738" height="960"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I copied the token in my Notes and continued my journey. Next stop? Getting an OpenAI account!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Time spent: ~3 minutes&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Part II: setting up OpenAI
&lt;/h2&gt;

&lt;p&gt;Pretty simple step, I just needed to get an &lt;a href="https://beta.openai.com/account/api-keys" rel="noopener noreferrer"&gt;API key&lt;/a&gt; that the bot would use for calling the API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy87hgcwyaec8tmgznvpc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy87hgcwyaec8tmgznvpc.png" alt="Generating an OpenAI API key" width="800" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I wanted to go for a quick test. But, what API should I call, and how? Fortunately the &lt;a href="https://beta.openai.com/docs/api-reference/introduction" rel="noopener noreferrer"&gt;OpenAI API reference&lt;/a&gt; is nice and clear. After browsing the docs for a little bit I found it: what I was looking for was the &lt;a href="https://beta.openai.com/docs/api-reference/completions" rel="noopener noreferrer"&gt;Completions API&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;They even provide a curl command line example I could use! I tried and of course it worked like a charm.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Time spent: ~4 minutes&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Part III: implementation time!
&lt;/h2&gt;

&lt;p&gt;I went to Make and created a new Scenario. Scenarios are essentially programs composed by "Modules". Each module does something, for example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make an HTTP call&lt;/li&gt;
&lt;li&gt;Parse a JSON string&lt;/li&gt;
&lt;li&gt;Extract text from HTML&lt;/li&gt;
&lt;li&gt;Iterate over an array&lt;/li&gt;
&lt;li&gt;Branch the flow on given conditions&lt;/li&gt;
&lt;li&gt;Set a variable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;... and so on.&lt;/p&gt;

&lt;p&gt;So what you do is basically add and connect modules, customizing them to your needs.&lt;/p&gt;

&lt;p&gt;However, that's not all, and the game changer here is &lt;a href="https://www.make.com/en/integrations" rel="noopener noreferrer"&gt;the number of integrations&lt;/a&gt; that Make have with existing services out there. In that sense, is no different than other tools such as &lt;a href="https://zapier.com" rel="noopener noreferrer"&gt;Zapier&lt;/a&gt; or &lt;a href="https://ifttt.com" rel="noopener noreferrer"&gt;IFTTT&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;So for example, would you like to do some stuff with Reddit or TikTok? Lots of modules for that:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6sjyd91itubgy4rftg68.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6sjyd91itubgy4rftg68.png" alt="Examples of what you can do with Reddit or TikTok" width="800" height="632"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And, you may have guessed it already - there are modules for Telegram as well!&lt;/p&gt;

&lt;h4&gt;
  
  
  Receiving Telegram messages
&lt;/h4&gt;

&lt;p&gt;Let's go back to the flow I sketched. First thing I needed to do was to receive the Telegram message that was sent to the bot. For this I needed the "Watch Updates" module:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshq7bgud1owkaqfgl5tl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshq7bgud1owkaqfgl5tl.png" alt="The " width="800" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I added the module to the scenario and it opened up a configuration panel:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb3q3svek5f5zvfkppqhi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb3q3svek5f5zvfkppqhi.png" alt="Configuring the module" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This module wanted to know the webhook that was gonna be used to receive the updates. Since this was a new project, I didn't have one, so I went and added a new webhook. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdfonfzz32ssvqfgjch21.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdfonfzz32ssvqfgjch21.png" alt="Adding a new webhook" width="800" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now it was asking me for which Telegram connection the webhook should be added, but again, new project, so no connections existed yet! I proceeded to add a new connection.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvh1tisvvzrtlspf12a7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqvh1tisvvzrtlspf12a7.png" alt="Adding a new Telegram connection" width="800" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I copy/pasted the token I saved in my Notes, saved the connection, then saved the webhook and after a few seconds I was back in the module configuration panel, only this time it would say:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We read your mind, we attached this webhook automatically for you.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftox07lu0u365rff86iv6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftox07lu0u365rff86iv6.png" alt="Configured module" width="800" height="374"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was cool! To appreciate what Make just did for me, let's imagine if I had to do it myself:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;I should create an Express app&lt;/li&gt;
&lt;li&gt;Then add a route that follows the Telegram webhook spec (meaning, I need to read and understand the docs as well)&lt;/li&gt;
&lt;li&gt;Then implement logic for parsing the Telegram webhook notification message (again, reading docs to see how the message is formatted and structured)&lt;/li&gt;
&lt;li&gt;Then use ngrok, localtunnel or similar to temporarily expose my local server&lt;/li&gt;
&lt;li&gt;Then either on the side, or as part of the app bootstrap process, make a call to &lt;code&gt;setWebhook&lt;/code&gt; in the Telegram API and give it the public URL of my server (again, reading docs involved)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;and let's also count going back and forth multiple times between some of those points unless I'm lucky enough to get it 100% right in one go. Only after that, I would be ready to test.&lt;/p&gt;

&lt;p&gt;But this no-code platform was already shining by solving all that stuff in a mere couple minutes since I picked the module.&lt;/p&gt;

&lt;p&gt;Now it was time to give it a test! The module was configured so it should be able to get my messages.&lt;/p&gt;

&lt;p&gt;I went back to Telegram, searched for my bot opened a conversation window, and clicked the Start button. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgsxzl30ga92qd4zw4vl6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgsxzl30ga92qd4zw4vl6.png" alt="Looking for my bot on Telegram" width="752" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There I was in an empty, silence chatroom with my bot. Before it would become too uncomfortable, I went back to Make and hit the Play button to run the scenario:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs322kdm2auqqo35akdhd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs322kdm2auqqo35akdhd.png" alt="Running the scenario" width="800" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Telegram Bot module started spinning, indicating it was waiting for a message to come. I went back to the chatroom and wrote my bot a message:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2f9auc7u3a7wcski3ece.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2f9auc7u3a7wcski3ece.png" alt="Sending my first message to the bot" width="740" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back in Make, the scenario was now stopped, but a bubble coming out from the module indicated a message has been received:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F22tdap0242qijf90m684.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F22tdap0242qijf90m684.jpeg" alt="Inspecting the received message" width="800" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Amazing!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Time spent: ~5 minutes&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Connecting the bot to OpenAI
&lt;/h4&gt;

&lt;p&gt;Now I needed to send this message as a prompt to OpenAI.&lt;/p&gt;

&lt;p&gt;I looked for OpenAI modules:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqhh6snolsykpiuv0ijk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuqhh6snolsykpiuv0ijk.png" alt="There is no OpenAI module yet" width="800" height="209"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ok that would have been too easy. I hope Make comes up with an OpenAI integration soon (pretty sure they will).&lt;/p&gt;

&lt;p&gt;But hey, not a big deal. We said OpenAI offers an API, more specifically an HTTP API. And guess what - Make has modules for that. One of them is "Make an API Key Auth request". Exactly what I needed!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1u2d8g9bggiysn3fqbqq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1u2d8g9bggiysn3fqbqq.png" alt="HTTP request module" width="800" height="239"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After adding it to the scenario, it asked me for a bunch of stuff. First of all, the credentials that should be used for the API call. I clicked Add since I haven't added any credentials so far, and typed in the values. I knew where the API key should go, from the docs and the example I ran before:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcjfdf4guqw9pjfrwufs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffcjfdf4guqw9pjfrwufs.png" alt="OpenAI expected authentication" width="800" height="125"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So I completed the credentials configuration and clicked Create:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0mq92k1kuato4j9e3geu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0mq92k1kuato4j9e3geu.png" alt=" " width="800" height="510"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then proceeded with the module settings. Something that you would notice when going though the configuration fields, is that anytime there's a chance to use a dynamic value as an input, Make will show a popup with a lot of values or "placeholders" that you can embed in those fields - not only displaying available values coming out from other modules (such as the Telegram Bot module, in this case) but also utilities such as string, numeric and date functions. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttlp5dpsuv8jcrgez2ik.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fttlp5dpsuv8jcrgez2ik.png" alt="Configuring the HTTP request module" width="800" height="713"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was really convenient, since I wanted the &lt;code&gt;prompt&lt;/code&gt; property in the request body to be whatever message text we received from Telegram. I needed some way to express the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "model": "text-davinci-003",
  "prompt": "&amp;lt;the-telegram-message-here&amp;gt;"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, as you can see, it was a very simple thing to do. I just positioned the cursor between the quotes in &lt;code&gt;prompt: ""&lt;/code&gt;, and picked the placeholder for the &lt;code&gt;Text&lt;/code&gt; property of the &lt;code&gt;Message&lt;/code&gt; object coming from the Telegram Bot module:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr2exapxx77a9nwt7tfj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvr2exapxx77a9nwt7tfj.png" alt="Embedding dynamic values in module inputs" width="800" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have in mind, Make can only suggest values it knows. If I haven't had run the Telegram module before, there wouldn't have been any output. Without any output, Make doesn't know the structure or values that the Telegram module can "spit out" after execution. &lt;/p&gt;

&lt;p&gt;In a way this is OK, but since we are talking about well defined APIs here, I would have expected Make to know the schema of the module they are providing and let me choose any property of that schema regardless if I ran the scenario or the result of it.&lt;/p&gt;

&lt;p&gt;Anyway, I saved the module and I was ready for another test! I hit the Play button again, went back to Telegram, wrote another message.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo7ayh6iuhaovsylf57jn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fo7ayh6iuhaovsylf57jn.png" alt="Writing another test message on Telegram" width="792" height="204"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Back in Make, this time it took several seconds for the update to arrive – so, if this happens to you, give it a good 10, maybe 20 seconds. The message finally arrived, the flow then continued to the HTTP module, which made the request to the OpenAI API passing the Telegram message, and I could inspect the API response as well:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkdkz7xjbxenkxv4h6lk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgkdkz7xjbxenkxv4h6lk.png" alt="Inspecting inputs and outputs in the HTTP module" width="800" height="780"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So exciting! But no time for celebrations yet, we need to send that response back to Telegram!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Time spent: ~6 minutes&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Replying back on Telegram
&lt;/h4&gt;

&lt;p&gt;I knew there was another Telegram module for sending messages:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fenxycpabrxhk00x8w1p6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fenxycpabrxhk00x8w1p6.png" alt="Send message module" width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Configuration for this one was super straightforward - the connection was automatically selected, and for the rest of the fields it was just a matter of picking up the right values from the right modules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I extracted the Chat ID from the original message, since I want to respond in the same chatroom.&lt;/li&gt;
&lt;li&gt;The message text would be the OpenAI response, coming in the &lt;code&gt;choices&lt;/code&gt; array (take note, arrays in Make start at 1, not 0!)&lt;/li&gt;
&lt;li&gt;I wanted to specify the original message id so in Telegram the message will be sent as a reply, so I extracted the message id from the original message.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiehusapbxcxkoruqrr8p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiehusapbxcxkoruqrr8p.png" alt="Configuring the send message module" width="800" height="1199"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Time to test it again? Of course! I hit that Play button one more time:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrc859vatzksp7mw1s8g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frrc859vatzksp7mw1s8g.png" alt=" " width="800" height="343"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Wrote another message on Telegram:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffmckdkeadwfag94gf4a8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffmckdkeadwfag94gf4a8.png" alt="Writing another message to my bot..." width="758" height="118"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and I waited... I didn't even want to check the Make scenario. I just waited for the magic. And a few seconds later...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpr36i3z12pumsprlrgu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmpr36i3z12pumsprlrgu.png" alt="... and receiving its response!" width="750" height="296"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🙀 🙀 🙀 🙀 🙀&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/3oz8xxMxaYh11PXifu/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/3oz8xxMxaYh11PXifu/giphy.gif" width="480" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Time spent: ~3 minutes&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;About 21 minutes after, I had a running AI bot. I invited the bot to a Telegram group I have with some friends, and oh boy if we had fun! The davinci-003 model is super awesome. There are cheaper (and faster/less latency) models, I suggest you test which one better fits your needs. &lt;/p&gt;

&lt;h3&gt;
  
  
  To be continued!
&lt;/h3&gt;

&lt;p&gt;But, hold on. This is not the end of the story. I wanted to make several improvements to the bot - so I did. &lt;/p&gt;

&lt;p&gt;For example, I didn't want the bot to react on absolutely every message - otherwise when the bot is in a group this only ensures chaos and spam. This turned out to be fairly simply with Make - I encourage you to figure it out yourself before I get to write the follow up post. 😉&lt;/p&gt;

&lt;p&gt;Second, I wanted the bot to kind of keep the thread of the conversation. Otherwise every new message it receives, is kind of a new conversation. This required a little bit more effort, but again was done in about half an hour thanks to Make.&lt;/p&gt;

&lt;p&gt;Stay tuned, I'll post the rest of the story soon!&lt;/p&gt;

</description>
      <category>watercooler</category>
    </item>
  </channel>
</rss>
