Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Desarrolla un GPT: Lecciones y Aprendizajes

Desarrolla un GPT: Lecciones y Aprendizajes

English Description
Build a GPT: Lessons and Learnings
In this talk, we’ll demystify the world of AI and guide you in creating a ChatGPT plugin. Using JavaScript and OpenAPI, we’ll share how the Typeform team developed a custom plugin, now used by hundreds. With practical examples, you’ll see that you don’t need to be an expert in programming or AI. Together, we’ll build a live plugin that interacts with real data, empowering you to explore the possibilities of large language models and their impact.

Spanish Description
Desarrolla un GPT: Lecciones y Aprendizajes
En esta charla, desmitificaremos el mundo de la IA y te guiaremos en la creación de un plugin para ChatGPT. Usando JavaScript y OpenAPI, compartiremos cómo el equipo de Typeform desarrolló un plugin personalizado, ahora utilizado por cientos de personas. A través de ejemplos prácticos, te mostraremos que no es necesario ser un experto en programación o IA. Crearemos juntos un plugin en vivo que interactúe con datos reales, preparándote para explorar las posibilidades de los modelos de lenguaje y su impacto.

Nicolas Grenié

October 24, 2024
Tweet

More Decks by Nicolas Grenié

Other Decks in Technology

Transcript

  1. Typeform es un creador de formularios refrescantemente diferente. Ayudamos a

    más de 150,000 empresas a recopilar los datos que necesitan con formularios, encuestas y cuestionarios que las personas disfrutan. Diseñado para ser visualmente atractivo y fácil de completar, Typeform genera 500 millones de respuestas cada año e integra herramientas esenciales como Slack, Zapier y Hubspot. Quien Somos
  2. Tiene Limitaciones 🧠 Fecha de caducidad 🔒 Acceso a datos

    privados 👁 Solo lectura ⚙ Actiones complejas @picsoung
  3. GPTs al rescate 🕸 Navegar por la web 🎨 Generar

    imagenes 📚 Conocimiento propio ☎ Hacer llamadas de APIs @picsoung
  4. Despacito y con calma 🥵 Demasiado 1.3Mb ✅ Focus en

    los endpoints claves 😡 Parser enfadado ✅ Pruebas y errores @picsoung 🥼 OpenAPI Doctor
  5. Descripciones detalladas 😕 "/forms": { "get": { "description": "Retrieves a

    list of JSON descriptions for all forms in your Typeform account (public and private).”, } } ✅ "/forms": { "get": { "description": "Fetches all user's forms, both public and private. Forms are sortable by creation or update date. 'total_items' in the response indicates the total count of forms across all workspaces", } }
  6. Descripciones detalladas ✅ usa summary @picsoung descripción corta y concisa

    de la operación, comenzando con un verbo, que ayuda al lector a entender lo que es posible de inmediato.
  7. No es solo un proxy 😕 proxy su API publica

    ✅ app dedicada con validación del payload @picsoung
  8. No es solo un proxy Ejemplo: Hacer un campo obligatorio

    { "id": "3ZrpOMXesjPE", "title": "Great, nice to meet you! What's the best email address to send your order confirmation to?", "ref": "01H1TXJBXN4VFKFQG1KTHE3G47", "validations": { "required": false true }, "type": "email" }
  9. No es solo un proxy PUT /forms/:form_id { "id": "WMnP13wp",

    "type": "quiz", "title": "Handmade Dog Bandanas Order Form", "workspace": { "href": "https://api.typeform.com/workspaces/eTMFvv" }, "theme": { "href": "https://api.typeform.com/themes/qHWOQ7" }, "settings": { "language": "en", "progress_bar": "proportion", "meta": { "allow_indexing": false }, "hide_navigation": false, "is_public": true, "is_trial": false, "show_progress_bar": true, "show_typeform_branding": true, "are_uploads_public": false, "show_time_to_complete": true, "show_number_of_submissions": false, "show_cookie_consent": false, "show_question_number": true, "show_key_hint_on_choices": true, "autosave_progress": true, "free_form_navigation": false, "use_lead_qualification": false,
  10. No es solo un proxy PUT /forms/:form_id { "id": "WMnP13wp",

    "type": "quiz", "title": "Handmade Dog Bandanas Order Form", "workspace": { "href": "https://api.typeform.com/workspaces/eTMFvv" }, "theme": { "href": "https://api.typeform.com/themes/qHWOQ7" }, "settings": { "language": "en", "progress_bar": "proportion", "meta": { "allow_indexing": false }, "hide_navigation": false, "is_public": true, "is_trial": false, "show_progress_bar": true, "show_typeform_branding": true, "are_uploads_public": false, "show_time_to_complete": true, "show_number_of_submissions": false, "show_cookie_consent": false, "show_question_number": true, "show_key_hint_on_choices": true, "autosave_progress": true, "free_form_navigation": false, "use_lead_qualification": false, Error: context too long
  11. No es solo un proxy ✅ Nuevo endpoint /forms/:form_id/field {

    "field": { "id": "3ZrpOMXesjPE", "title": "Great, nice to meet you! What's the best email address to send your order confirmation to?", "ref": "01H1TXJBXN4VFKFQG1KTHE3G47", "validations": { "required": true }, "type": "email" } } @picsoung
  12. Ser creativo con datos { "items": [ { "landing_id": "kfmupqcs36j8x5mnlkfzkure3u0gcu1w",

    "token": "kfmupqcs36j8x5mnlkfzkure3u0gcu1w", "response_id": "kfmupqcs36j8x5mnlkfzkure3u0gcu1w", "response_type": "completed", "landed_at": "2023-06-01T07:42:48Z", "submitted_at": "2023-06-01T07:43:32Z", "metadata": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36", "platform": "other", "referer": "https://picsoung.typeform.com/to/NiYPn3nZ", "network_id": "95f0269a9d", "browser": "default" }, "hidden": {}, "calculated": { "score": 0 }, "answers": [ { "field": { "id": "SpZfcsQQMBBH", "type": "short_text",
  13. Ser creativo con datos { "items": [ { "landing_id": "kfmupqcs36j8x5mnlkfzkure3u0gcu1w",

    "token": "kfmupqcs36j8x5mnlkfzkure3u0gcu1w", "response_id": "kfmupqcs36j8x5mnlkfzkure3u0gcu1w", "response_type": "completed", "landed_at": "2023-06-01T07:42:48Z", "submitted_at": "2023-06-01T07:43:32Z", "metadata": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36", "platform": "other", "referer": "https://picsoung.typeform.com/to/NiYPn3nZ", "network_id": "95f0269a9d", "browser": "default" }, "hidden": {}, "calculated": { "score": 0 }, "answers": [ { "field": { "id": "SpZfcsQQMBBH", "type": "short_text", 4.54kb
  14. Ser creativo con datos 1.56kb "response_data": "response_id,landed_at,submitted_at,\"Hello there! We're excited

    to learn more about you for our upcoming trivia event. To start, could you please tell us your name?\",\"Great, nice to meet you! Now, could you please share a fun or interesting fact about yourself? This could be a hobby, a skill, an experience, anything you like!\",\"Awesome! Now, could you please share another fun or interesting fact about yourself?\",\"Now, let's make things interesting. Could you please tell us a lie about yourself? This should be something that sounds plausible but isn't true.\",score\nkfmupqcs36j8x5mnlkfzkure3u0gcu1w,2023-06-01T07:42:48Z,2023-06-01T07:43:32 Z,Jorge,My mom was my teacher for all middle school.,I won an olympic medal.,I base jump from Everest in 2019,0\nw4fxhe61ljxmp5hfw4fxhijwretuixb5,2023-06-01T07:42:03Z,2023-06-01T07:42:42Z,Matild a,I learned how to code on my gameboy.,I can't taste sour things.,My favourite ice cream is garlic.,0\ncfr3df00km6dd8xr184cfr3dp0su0vbc,2023-06-01T07:41:19Z,2023-06-01T07:41:58Z,Pe dro,I speak chinese fluently,I don't have pinky toe.,I never left the states.,0\nEXTRA_INFORMATION_TO_ASSISTANT,\"Due to limitation on the amount of data that can be handle by model, the responses analysis is only available on a subset of all the responses. This is not a complete analysis. Assistant should explicit those limitations and link to typeform result dashboard for further analysis. Link should be of the form https://admin.typeform.com/form/{FORM_ID}/results#summary.\"\nTOTAL_NUMBER_OF_RESP ONSES_COLLECTED,3\nRESPONSES_IN_SUBSET,3\n",
  15. Acciones con repercusion 😕 No permitas que los usuarios hagan

    cosas de las que se arrepentirán ✅ Añade un flag en OpenAPI x-openai-isConsequential:true @picsoung
  16. Desarrollo local 😕 La URL de autorización, la URL del

    token y el nombre de host de la API deben compartir el dominio raíz. ✅ Utiliza API key en dev @picsoung