Gemini Kit

This kit contains components that provide access to Gemini API. Currently, there are two components: the text and the nano.

The text component

Use this component to use the larger Gemini models: Flash and Pro.

The component has no required inputs, but expects one of either Context or Text input port values to be supplied. Otherwise, it will throw an error.

The component's inputs and outputs mimic Gemini generateContent API, with a few important additions:

Input Ports

Output Ports

Example

The board above is how one might typically use the text node. Here's another example, using Text input and output ports:

For a more elaborate use case, let's give it a few tools and let it make a decision to call them:

When we invoke this board with a prompt like "write me a poem?", we will see it respond with text, as usual. However, if we ask it questions like "what is the square root of e?" or "what is the distance between Earth and Moon?", it will issue a tool call:

Tool Call Example

The nano component

Allows calling the on-device Gemini Nano model via the experimental Prompt API. You have to sign up for early access here.

Input Ports

Output Ports

Example

The board above provides a simple example of how to use the component in a board.