Disparar tareas en JS según conversación con el chat. En español

Estoy investigando como generar request especificos, todo desde java script, según sea la conversación, por ejemplo si se le pide al chat enviar un email, que este pregunte el email y una vez ingresado genere un request a una API para enviar el email. Todo en java script

Hi @Sinuhe_Melis,

Welcome to forum, try function calling to get a structured output. Now use the extracted structured output to call your own API’s.

Here are the references to help you with Javascript: Function calling tutorial  |  Gemini API  |  Google AI for Developers

Gemini JDK github : GitHub - google-gemini/generative-ai-js: The official Node.js / Typescript library for the Google Gemini API
References for all functionalities: generative-ai-js/samples at main · google-gemini/generative-ai-js · GitHub

Hope this helps.

Cheers !!