Skip to content

Google Gemini

Version

I can choose between version 1 or 1beta to use this node.

API Key

To use this node, I need to enter the API key.

Model

Select the model to fulfill the desired request. In addition to available models, I can add newly released models if they are accessible via the API.

Gemini 1.0 Pro

  • A foundational model in Google’s Gemini series.
  • Designed for a balance between performance and cost, suitable for various natural language processing tasks such as text generation, translation, summarization, question answering, and programming.
  • Capable of understanding and generating complex text with high accuracy.

Gemini 1.0 Pro Vision

  • An extended version of Gemini 1.0 Pro, enhanced with the ability to process images and videos (multimodal).
  • In addition to the text processing capabilities of 1.0 Pro, this model can analyze images and videos to describe content, answer related questions, and extract information from them.

Gemini 1.5 Pro

  • The next generation, marking a significant advancement in processing capabilities.
  • Key highlight: An extremely large context window of up to 1 million tokens (equivalent to hundreds of thousands of words or hours of video/audio), enabling seamless processing of lengthy documents, code, or videos.
  • Significant improvements in complex reasoning, problem-solving, programming, and multimodal understanding compared to the 1.0 series.
  • More efficient in training and serving.

Gemini 1.5 Flash

  • A lighter and faster version of Gemini 1.5 Pro.

  • Optimized for speed and cost efficiency while retaining many core capabilities of 1.5 Pro, including a large context window and strong multimodal reasoning.

  • Ideal for applications requiring low latency and high throughput, such as quick summarization, chatbot applications, image/video captioning, and extracting data from long documents.

  • Summary:

    • 1.0 Pro: Versatile, balanced model.
    • 1.0 Pro Vision: Like 1.0 Pro but adds image/video understanding.
    • 1.5 Pro: Most powerful, with a massive context window and advanced task handling.
    • 1.5 Flash: Fast and efficient, retaining many 1.5 Pro advantages, ideal for speed-critical applications.

Prompt

The question or request to be answered by Gemini.

Prompt Media

An image accompanying the prompt.

Assign to Variable

Assign the output to a Variable.

  • Variable Name: Name of the variable to assign the value to. This field appears when I select Assign to Variable.

Insert into Table

Insert the value into a column in a Table.

  • Select Column: The column where the value will be inserted. This field appears when I select Insert into Table.

Add Extra Row

Insert an additional row into a column in a Table.

Practical Example

For example, I want to ask the AI to generate a question for the Professor AI in the Gokite testnet as follows:

i

To obtain the API key, I visit this link.

Then, I click the Create API key button. I select a project in my Google account, or create a new one if none exists, then choose an account and click Create API key in existing project to generate the API key.

api

After creating the Gemini AI node, I enter the API key into the API Key field.

For the Model field, since I want to generate a question, I choose the gemini-1.5-pro model, suitable for question generation.

For the Prompt field, since I want to generate a question for the Professor AI, which helps explore the Kite AI testnet ecosystem, I describe the prompt as: Create a question related to the Kite AI testnet ecosystem. I can also add requirements like question in English, no more than 100 characters, return only the question without additional characters. The prompt is entered as follows:

After running the node, it returns a question. To capture the question, I use a variable or table. For ease of use in the workflow, I assign the question to a variable named questionAI.

The final node configuration looks like this:

i

After configuration, I run the node, and the AI returns the result in the questionAI variable as follows:

i

After obtaining the question, I use a Key Press node to input the question, using the expression to retrieve the variable value: {{variables.questionAI}}, and send it to the AI:

i

The text is then displayed as follows:

i

Thus, I have successfully used the Gemini AI node to generate a question for the Gokite AI testnet.