# ChatGoogleGenerativeAI

## Prerequisitos

1. Registra una cuenta de [Google](https://accounts.google.com/InteractiveLogin)
2. Crea una [API key](https://aistudio.google.com/app/apikey)

## Configuración

1. **Chat Models** > arrastra el nodo **ChatGoogleGenerativeAI**

<figure><img src="/files/AB7UbxhXX3mcg2QaOh1e" alt="" width="563"><figcaption></figcaption></figure>

2. **Connect Credential** > haz clic en **Create New**

<figure><img src="/files/KHD0dcPmj2QtOYllKsxg" alt="" width="278"><figcaption></figcaption></figure>

3. Completa la credencial de **Google AI**

<figure><img src="/files/vxjjHEuoLwEUQ0ykZSgo" alt="" width="563"><figcaption></figcaption></figure>

4. ¡Voilà [🎉](https://emojipedia.org/party-popper/), ahora puedes usar el **nodo ChatGoogleGenerativeAI** en Flowise

<figure><img src="/files/gUWsxCV4rz46MxVc8LJs" alt=""><figcaption></figcaption></figure>

## Configuración de Atributos de Seguridad

1. Haz clic en **Additonal Parameters**

<figure><img src="/files/eBDOtSLwTqh0XD0M6Fci" alt="" width="563"><figcaption></figcaption></figure>

* Al configurar los **Safety Attributes**, la cantidad de selecciones en **Harm Category** y **Harm Block Threshold** debe ser la misma. Si no lo es, se mostrará el error `Harm Category & Harm Block Threshold are not the same length`
* La combinación de **Safety Attributes** que se muestra a continuación resultará en que `Dangerous` se configure como `Low and Above` y `Harassment` como `Medium and Above`

<figure><img src="/files/1oN6pm7ymWLcFMqLp3nY" alt="" width="563"><figcaption></figcaption></figure>

## Recursos

* [LangChain JS ChatGoogleGenerativeAI](https://js.langchain.com/docs/integrations/chat/google_generativeai)
* [Google AI for Developers](https://ai.google.dev/)
* [Documentación de la API de Gemini](https://ai.google.dev/docs)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowiseai.com/espanol/documentacion-oficial/integraciones/langchain/chat-models/google-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
